aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath9k/regd.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath9k/regd.c b/drivers/net/wireless/ath9k/regd.c
index cccec40139c2..dfcc3b5274cb 100644
--- a/drivers/net/wireless/ath9k/regd.c
+++ b/drivers/net/wireless/ath9k/regd.c
@@ -160,8 +160,12 @@ static bool ath9k_is_radar_freq(u16 center_freq)
160 return (center_freq >= 5260 && center_freq <= 5700); 160 return (center_freq >= 5260 && center_freq <= 5700);
161} 161}
162 162
163/* Enable adhoc on 5 GHz if allowed by 11d */ 163/*
164static void ath9k_reg_apply_5ghz_adhoc_flags(struct wiphy *wiphy, 164 * Enable adhoc on 5 GHz if allowed by 11d.
165 * Remove passive scan if channel is allowed by 11d,
166 * except when on radar frequencies.
167 */
168static void ath9k_reg_apply_5ghz_beaconing_flags(struct wiphy *wiphy,
165 enum reg_set_by setby) 169 enum reg_set_by setby)
166{ 170{
167 struct ieee80211_supported_band *sband; 171 struct ieee80211_supported_band *sband;
@@ -189,6 +193,10 @@ static void ath9k_reg_apply_5ghz_adhoc_flags(struct wiphy *wiphy,
189 * probe */ 193 * probe */
190 if (!(reg_rule->flags & NL80211_RRF_NO_IBSS)) 194 if (!(reg_rule->flags & NL80211_RRF_NO_IBSS))
191 ch->flags &= ~NL80211_RRF_NO_IBSS; 195 ch->flags &= ~NL80211_RRF_NO_IBSS;
196 if (!ath9k_is_radar_freq(ch->center_freq))
197 continue;
198 if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
199 ch->flags &= ~NL80211_RRF_PASSIVE_SCAN;
192 } 200 }
193} 201}
194 202
@@ -283,10 +291,10 @@ void ath9k_reg_apply_world_flags(struct wiphy *wiphy, enum reg_set_by setby)
283 case 0x63: 291 case 0x63:
284 case 0x66: 292 case 0x66:
285 case 0x67: 293 case 0x67:
286 ath9k_reg_apply_5ghz_adhoc_flags(wiphy, setby); 294 ath9k_reg_apply_5ghz_beaconing_flags(wiphy, setby);
287 break; 295 break;
288 case 0x68: 296 case 0x68:
289 ath9k_reg_apply_5ghz_adhoc_flags(wiphy, setby); 297 ath9k_reg_apply_5ghz_beaconing_flags(wiphy, setby);
290 ath9k_reg_apply_active_scan_flags(wiphy, setby); 298 ath9k_reg_apply_active_scan_flags(wiphy, setby);
291 break; 299 break;
292 } 300 }