diff options
Diffstat (limited to 'drivers/net/wireless/ath/regd.c')
-rw-r--r-- | drivers/net/wireless/ath/regd.c | 52 |
1 files changed, 23 insertions, 29 deletions
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c index 1217c52ab28e..d3bbf48522b6 100644 --- a/drivers/net/wireless/ath/regd.c +++ b/drivers/net/wireless/ath/regd.c | |||
@@ -37,17 +37,18 @@ static int __ath_regd_init(struct ath_regulatory *reg); | |||
37 | 37 | ||
38 | /* We enable active scan on these a case by case basis by regulatory domain */ | 38 | /* We enable active scan on these a case by case basis by regulatory domain */ |
39 | #define ATH9K_2GHZ_CH12_13 REG_RULE(2467-10, 2472+10, 40, 0, 20,\ | 39 | #define ATH9K_2GHZ_CH12_13 REG_RULE(2467-10, 2472+10, 40, 0, 20,\ |
40 | NL80211_RRF_PASSIVE_SCAN) | 40 | NL80211_RRF_NO_IR) |
41 | #define ATH9K_2GHZ_CH14 REG_RULE(2484-10, 2484+10, 40, 0, 20,\ | 41 | #define ATH9K_2GHZ_CH14 REG_RULE(2484-10, 2484+10, 40, 0, 20,\ |
42 | NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_OFDM) | 42 | NL80211_RRF_NO_IR | \ |
43 | NL80211_RRF_NO_OFDM) | ||
43 | 44 | ||
44 | /* We allow IBSS on these on a case by case basis by regulatory domain */ | 45 | /* We allow IBSS on these on a case by case basis by regulatory domain */ |
45 | #define ATH9K_5GHZ_5150_5350 REG_RULE(5150-10, 5350+10, 80, 0, 30,\ | 46 | #define ATH9K_5GHZ_5150_5350 REG_RULE(5150-10, 5350+10, 80, 0, 30,\ |
46 | NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS) | 47 | NL80211_RRF_NO_IR) |
47 | #define ATH9K_5GHZ_5470_5850 REG_RULE(5470-10, 5850+10, 80, 0, 30,\ | 48 | #define ATH9K_5GHZ_5470_5850 REG_RULE(5470-10, 5850+10, 80, 0, 30,\ |
48 | NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS) | 49 | NL80211_RRF_NO_IR) |
49 | #define ATH9K_5GHZ_5725_5850 REG_RULE(5725-10, 5850+10, 80, 0, 30,\ | 50 | #define ATH9K_5GHZ_5725_5850 REG_RULE(5725-10, 5850+10, 80, 0, 30,\ |
50 | NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS) | 51 | NL80211_RRF_NO_IR) |
51 | 52 | ||
52 | #define ATH9K_2GHZ_ALL ATH9K_2GHZ_CH01_11, \ | 53 | #define ATH9K_2GHZ_ALL ATH9K_2GHZ_CH01_11, \ |
53 | ATH9K_2GHZ_CH12_13, \ | 54 | ATH9K_2GHZ_CH12_13, \ |
@@ -223,18 +224,11 @@ ath_reg_apply_beaconing_flags(struct wiphy *wiphy, | |||
223 | * default during init, prior to calling our | 224 | * default during init, prior to calling our |
224 | * regulatory_hint(). | 225 | * regulatory_hint(). |
225 | */ | 226 | */ |
226 | if (!(reg_rule->flags & | 227 | if (!(reg_rule->flags & NL80211_RRF_NO_IR)) |
227 | NL80211_RRF_NO_IBSS)) | 228 | ch->flags &= ~IEEE80211_CHAN_NO_IR; |
228 | ch->flags &= | ||
229 | ~IEEE80211_CHAN_NO_IBSS; | ||
230 | if (!(reg_rule->flags & | ||
231 | NL80211_RRF_PASSIVE_SCAN)) | ||
232 | ch->flags &= | ||
233 | ~IEEE80211_CHAN_PASSIVE_SCAN; | ||
234 | } else { | 229 | } else { |
235 | if (ch->beacon_found) | 230 | if (ch->beacon_found) |
236 | ch->flags &= ~(IEEE80211_CHAN_NO_IBSS | | 231 | ch->flags &= ~IEEE80211_CHAN_NO_IR; |
237 | IEEE80211_CHAN_PASSIVE_SCAN); | ||
238 | } | 232 | } |
239 | } | 233 | } |
240 | } | 234 | } |
@@ -260,11 +254,11 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy, | |||
260 | */ | 254 | */ |
261 | if (initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) { | 255 | if (initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) { |
262 | ch = &sband->channels[11]; /* CH 12 */ | 256 | ch = &sband->channels[11]; /* CH 12 */ |
263 | if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN) | 257 | if (ch->flags & IEEE80211_CHAN_NO_IR) |
264 | ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; | 258 | ch->flags &= ~IEEE80211_CHAN_NO_IR; |
265 | ch = &sband->channels[12]; /* CH 13 */ | 259 | ch = &sband->channels[12]; /* CH 13 */ |
266 | if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN) | 260 | if (ch->flags & IEEE80211_CHAN_NO_IR) |
267 | ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; | 261 | ch->flags &= ~IEEE80211_CHAN_NO_IR; |
268 | return; | 262 | return; |
269 | } | 263 | } |
270 | 264 | ||
@@ -278,17 +272,17 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy, | |||
278 | ch = &sband->channels[11]; /* CH 12 */ | 272 | ch = &sband->channels[11]; /* CH 12 */ |
279 | reg_rule = freq_reg_info(wiphy, ch->center_freq); | 273 | reg_rule = freq_reg_info(wiphy, ch->center_freq); |
280 | if (!IS_ERR(reg_rule)) { | 274 | if (!IS_ERR(reg_rule)) { |
281 | if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN)) | 275 | if (!(reg_rule->flags & NL80211_RRF_NO_IR)) |
282 | if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN) | 276 | if (ch->flags & IEEE80211_CHAN_NO_IR) |
283 | ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; | 277 | ch->flags &= ~IEEE80211_CHAN_NO_IR; |
284 | } | 278 | } |
285 | 279 | ||
286 | ch = &sband->channels[12]; /* CH 13 */ | 280 | ch = &sband->channels[12]; /* CH 13 */ |
287 | reg_rule = freq_reg_info(wiphy, ch->center_freq); | 281 | reg_rule = freq_reg_info(wiphy, ch->center_freq); |
288 | if (!IS_ERR(reg_rule)) { | 282 | if (!IS_ERR(reg_rule)) { |
289 | if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN)) | 283 | if (!(reg_rule->flags & NL80211_RRF_NO_IR)) |
290 | if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN) | 284 | if (ch->flags & IEEE80211_CHAN_NO_IR) |
291 | ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; | 285 | ch->flags &= ~IEEE80211_CHAN_NO_IR; |
292 | } | 286 | } |
293 | } | 287 | } |
294 | 288 | ||
@@ -320,8 +314,7 @@ static void ath_reg_apply_radar_flags(struct wiphy *wiphy) | |||
320 | */ | 314 | */ |
321 | if (!(ch->flags & IEEE80211_CHAN_DISABLED)) | 315 | if (!(ch->flags & IEEE80211_CHAN_DISABLED)) |
322 | ch->flags |= IEEE80211_CHAN_RADAR | | 316 | ch->flags |= IEEE80211_CHAN_RADAR | |
323 | IEEE80211_CHAN_NO_IBSS | | 317 | IEEE80211_CHAN_NO_IR; |
324 | IEEE80211_CHAN_PASSIVE_SCAN; | ||
325 | } | 318 | } |
326 | } | 319 | } |
327 | 320 | ||
@@ -609,7 +602,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg, | |||
609 | const struct ieee80211_regdomain *regd; | 602 | const struct ieee80211_regdomain *regd; |
610 | 603 | ||
611 | wiphy->reg_notifier = reg_notifier; | 604 | wiphy->reg_notifier = reg_notifier; |
612 | wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY; | 605 | wiphy->regulatory_flags |= REGULATORY_STRICT_REG; |
613 | 606 | ||
614 | if (ath_is_world_regd(reg)) { | 607 | if (ath_is_world_regd(reg)) { |
615 | /* | 608 | /* |
@@ -617,7 +610,8 @@ ath_regd_init_wiphy(struct ath_regulatory *reg, | |||
617 | * saved on the wiphy orig_* parameters | 610 | * saved on the wiphy orig_* parameters |
618 | */ | 611 | */ |
619 | regd = ath_world_regdomain(reg); | 612 | regd = ath_world_regdomain(reg); |
620 | wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY; | 613 | wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG | |
614 | REGULATORY_COUNTRY_IE_FOLLOW_POWER; | ||
621 | } else { | 615 | } else { |
622 | /* | 616 | /* |
623 | * This gets applied in the case of the absence of CRDA, | 617 | * This gets applied in the case of the absence of CRDA, |