Skip to contentSkip to conversation

mac80211: check csa wiphy flag in ibss before switching

PATCH Applied Simon Wunderlich 2 participants 2 messages Nov 26, 2013 – Dec 2, 2013 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: check csa wiphy flag in ibss before switching

When external CSA IEs are received (beacons or action messages), a channel switch is triggered as well. This should only be allowed on devices which actually support channel switches, otherwise disconnect. (For the corresponding userspace invocation, the wiphy flag is checked in nl80211).

---
 net/mac80211/ibss.c |    4 ++++
 1 file changed, 4 insertions(+)
net/mac80211/ibss.c +4 -0
index 0f1fb5d..2eda7b1 100644
@@ -823,6 +823,10 @@ ieee80211_ibss_process_chanswitch(struct ieee80211_sub_if_data *sdata,
 	if (err)
 		return false;
 
+	/* channel switch is not supported, disconnect */
+	if (!(sdata->local->hw.wiphy->flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH))
+		goto disconnect;
+
 	params.count = csa_ie.count;
 	params.chandef = csa_ie.chandef;
 
Signature · 1 line
1.7.10.4
maintainer Applied
#1 lore raw
Quoted 5 lines · Simon Wunderlich

When external CSA IEs are received (beacons or action messages), a channel switch is triggered as well. This should only be allowed on devices which actually support channel switches, otherwise disconnect. (For the corresponding userspace invocation, the wiphy flag is checked in nl80211).

Applied.

johannes