All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] cfg80211: ignore channel state for stopped AP/mesh interfaces
@ 2012-07-12 14:10 Felix Fietkau
  2012-07-12 14:15 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Fietkau @ 2012-07-12 14:10 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, michal.kazior

Without this change, running AP + station on the same wiphy does not work
since the commit "cfg80211: add channel checking for iface combinations".
The stopped AP prevents the client from connecting to an AP on a different
channel.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 net/wireless/chan.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index 434c56b..1e03e04 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -136,9 +136,16 @@ cfg80211_get_chan_state(struct cfg80211_registered_device *rdev,
 		break;
 	case NL80211_IFTYPE_AP:
 	case NL80211_IFTYPE_P2P_GO:
+		if (wdev->beacon_interval) {
+			*chan = wdev->channel;
+			*chanmode = CHAN_MODE_SHARED;
+		}
+		return;
 	case NL80211_IFTYPE_MESH_POINT:
-		*chan = wdev->channel;
-		*chanmode = CHAN_MODE_SHARED;
+		if (wdev->mesh_id_len) {
+			*chan = wdev->channel;
+			*chanmode = CHAN_MODE_SHARED;
+		}
 		return;
 	case NL80211_IFTYPE_MONITOR:
 	case NL80211_IFTYPE_AP_VLAN:
-- 
1.7.3.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] cfg80211: ignore channel state for stopped AP/mesh interfaces
  2012-07-12 14:10 [PATCH v2] cfg80211: ignore channel state for stopped AP/mesh interfaces Felix Fietkau
@ 2012-07-12 14:15 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2012-07-12 14:15 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, michal.kazior

On Thu, 2012-07-12 at 16:10 +0200, Felix Fietkau wrote:
> Without this change, running AP + station on the same wiphy does not work
> since the commit "cfg80211: add channel checking for iface combinations".
> The stopped AP prevents the client from connecting to an AP on a different
> channel.

Applied, thanks.

johannes


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-12 14:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-12 14:10 [PATCH v2] cfg80211: ignore channel state for stopped AP/mesh interfaces Felix Fietkau
2012-07-12 14:15 ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.