Skip to contentSkip to conversation

ath: simplify radar / beaconing flag settings

PATCH New Luis R. Rodriguez 1 participant 2 messages Oct 21, 2013 Atheros ath generic utilities

lore
Share & tools
lore
#0 lore raw

cover ath: simplify radar / beaconing flag settings

John, Johannes,

these patches start cleaning up the flag usage through the reg-notifier but the main motiviation here as to help clarify the case in which DFS is supported and we don't need to apply some paranoid flags. I've determined its best to clean this up on cfg80211 (unifying flags) and deal with the DFS case in cfg80211 as well (I add the documentation, but expect Januz to send a respective change later for DFS).

Given that the later patches cfg80211 / other drivers I'll let you guys decide what tree these bubble up through.

This series simplifies the flag application setup. Just a heads up I noticed that broadcom and rtl drivers share a lot of this code so eventually we may want to just export these and share them somehow.

Luis R. Rodriguez (5):
ath: fix logic on ath_reg_apply_active_scan_flags()
ath: clean up ath_reg_apply_active_scan_flags()
ath: rename ath_reg_apply_active_scan_flags() to
ath_reg_apply_ir_flags()
ath: simplify ath_reg_apply_beaconing_flags()
ath: move the channel for ath_reg_apply_beaconing_flags() into helper

 drivers/net/wireless/ath/regd.c | 174 ++++++++++++++++++++++------------------
 1 file changed, 94 insertions(+), 80 deletions(-)
Signature · 1 line
1.8.4.rc3
#1 lore raw

PATCH 1/5 ath: fix logic on ath_reg_apply_active_scan_flags()

The existing logic removes the passive scan flag from channels 12 and 13 when a regulatory hint coming from something other than a country IE has been passed. This is incorrect, the original intention was to ensure we always have passive scan enabled for these two channels for a specific set of custom world regulatory domains.

---
 drivers/net/wireless/ath/regd.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/regd.c +6 -6
index c00687e..1b4a532 100644
@@ -255,16 +255,16 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy,
 		return;
 
 	/*
-	 * If no country IE has been received always enable active scan
-	 * on these channels. This is only done for specific regulatory SKUs
+	 * If no country IE has been received always enable passive scan
+	 * and no-ibss on these channels. This is only done for specific
+	 * regulatory SKUs.
 	 */
 	if (initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) {
 		ch = &sband->channels[11]; /* CH 12 */
-		if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
-			ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
+		ch->flags |= IEEE80211_CHAN_PASSIVE_SCAN;
+
 		ch = &sband->channels[12]; /* CH 13 */
-		if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
-			ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
+		ch->flags |= IEEE80211_CHAN_PASSIVE_SCAN;
 		return;
 	}
 
Signature · 1 line
1.8.4.rc3