diff options
Diffstat (limited to 'drivers/net/wireless/ath/regd.c')
-rw-r--r-- | drivers/net/wireless/ath/regd.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c index 3f4244f56ce5..028310f263c8 100644 --- a/drivers/net/wireless/ath/regd.c +++ b/drivers/net/wireless/ath/regd.c | |||
@@ -97,8 +97,8 @@ static const struct ieee80211_regdomain ath_world_regdom_66_69 = { | |||
97 | } | 97 | } |
98 | }; | 98 | }; |
99 | 99 | ||
100 | /* Can be used by 0x67, 0x6A and 0x68 */ | 100 | /* Can be used by 0x67, 0x68, 0x6A and 0x6C */ |
101 | static const struct ieee80211_regdomain ath_world_regdom_67_68_6A = { | 101 | static const struct ieee80211_regdomain ath_world_regdom_67_68_6A_6C = { |
102 | .n_reg_rules = 4, | 102 | .n_reg_rules = 4, |
103 | .alpha2 = "99", | 103 | .alpha2 = "99", |
104 | .reg_rules = { | 104 | .reg_rules = { |
@@ -151,13 +151,21 @@ ieee80211_regdomain *ath_world_regdomain(struct ath_regulatory *reg) | |||
151 | case 0x67: | 151 | case 0x67: |
152 | case 0x68: | 152 | case 0x68: |
153 | case 0x6A: | 153 | case 0x6A: |
154 | return &ath_world_regdom_67_68_6A; | 154 | case 0x6C: |
155 | return &ath_world_regdom_67_68_6A_6C; | ||
155 | default: | 156 | default: |
156 | WARN_ON(1); | 157 | WARN_ON(1); |
157 | return ath_default_world_regdomain(); | 158 | return ath_default_world_regdomain(); |
158 | } | 159 | } |
159 | } | 160 | } |
160 | 161 | ||
162 | bool ath_is_49ghz_allowed(u16 regdomain) | ||
163 | { | ||
164 | /* possibly more */ | ||
165 | return regdomain == MKK9_MKKC; | ||
166 | } | ||
167 | EXPORT_SYMBOL(ath_is_49ghz_allowed); | ||
168 | |||
161 | /* Frequency is one where radar detection is required */ | 169 | /* Frequency is one where radar detection is required */ |
162 | static bool ath_is_radar_freq(u16 center_freq) | 170 | static bool ath_is_radar_freq(u16 center_freq) |
163 | { | 171 | { |
@@ -261,7 +269,7 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy, | |||
261 | } | 269 | } |
262 | 270 | ||
263 | /* | 271 | /* |
264 | * If a country IE has been recieved check its rule for this | 272 | * If a country IE has been received check its rule for this |
265 | * channel first before enabling active scan. The passive scan | 273 | * channel first before enabling active scan. The passive scan |
266 | * would have been enforced by the initial processing of our | 274 | * would have been enforced by the initial processing of our |
267 | * custom regulatory domain. | 275 | * custom regulatory domain. |
@@ -326,6 +334,7 @@ static void ath_reg_apply_world_flags(struct wiphy *wiphy, | |||
326 | case 0x63: | 334 | case 0x63: |
327 | case 0x66: | 335 | case 0x66: |
328 | case 0x67: | 336 | case 0x67: |
337 | case 0x6C: | ||
329 | ath_reg_apply_beaconing_flags(wiphy, initiator); | 338 | ath_reg_apply_beaconing_flags(wiphy, initiator); |
330 | break; | 339 | break; |
331 | case 0x68: | 340 | case 0x68: |
@@ -342,6 +351,14 @@ int ath_reg_notifier_apply(struct wiphy *wiphy, | |||
342 | /* We always apply this */ | 351 | /* We always apply this */ |
343 | ath_reg_apply_radar_flags(wiphy); | 352 | ath_reg_apply_radar_flags(wiphy); |
344 | 353 | ||
354 | /* | ||
355 | * This would happen when we have sent a custom regulatory request | ||
356 | * a world regulatory domain and the scheduler hasn't yet processed | ||
357 | * any pending requests in the queue. | ||
358 | */ | ||
359 | if (!request) | ||
360 | return 0; | ||
361 | |||
345 | switch (request->initiator) { | 362 | switch (request->initiator) { |
346 | case NL80211_REGDOM_SET_BY_DRIVER: | 363 | case NL80211_REGDOM_SET_BY_DRIVER: |
347 | case NL80211_REGDOM_SET_BY_CORE: | 364 | case NL80211_REGDOM_SET_BY_CORE: |
@@ -461,7 +478,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg, | |||
461 | wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY; | 478 | wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY; |
462 | } else { | 479 | } else { |
463 | /* | 480 | /* |
464 | * This gets applied in the case of the absense of CRDA, | 481 | * This gets applied in the case of the absence of CRDA, |
465 | * it's our own custom world regulatory domain, similar to | 482 | * it's our own custom world regulatory domain, similar to |
466 | * cfg80211's but we enable passive scanning. | 483 | * cfg80211's but we enable passive scanning. |
467 | */ | 484 | */ |