Skip to contentSkip to conversation

cfg80211: ignore channel state for stopped AP/mesh interfaces

PATCH Applied Felix Fietkau 2 participants 2 messages Jul 12, 2012 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 cfg80211: ignore channel state for stopped AP/mesh interfaces

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.

---
 net/wireless/chan.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
net/wireless/chan.c +9 -2
index 434c56b..1e03e04 100644
@@ -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:
Signature · 1 line
1.7.3.2
maintainer Applied
#1 lore raw
Quoted 4 lines · Felix Fietkau

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