OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008-2009 Atheros Communications Inc. | 2 * Copyright (c) 2008-2009 Atheros Communications Inc. |
3 * | 3 * |
4 * Permission to use, copy, modify, and/or distribute this software for any | 4 * Permission to use, copy, modify, and/or distribute this software for any |
5 * purpose with or without fee is hereby granted, provided that the above | 5 * purpose with or without fee is hereby granted, provided that the above |
6 * copyright notice and this permission notice appear in all copies. | 6 * copyright notice and this permission notice appear in all copies. |
7 * | 7 * |
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 /* Can be used by 0x66 and 0x69 */ | 90 /* Can be used by 0x66 and 0x69 */ |
91 static const struct ieee80211_regdomain ath_world_regdom_66_69 = { | 91 static const struct ieee80211_regdomain ath_world_regdom_66_69 = { |
92 .n_reg_rules = 3, | 92 .n_reg_rules = 3, |
93 .alpha2 = "99", | 93 .alpha2 = "99", |
94 .reg_rules = { | 94 .reg_rules = { |
95 ATH9K_2GHZ_CH01_11, | 95 ATH9K_2GHZ_CH01_11, |
96 ATH9K_5GHZ_ALL, | 96 ATH9K_5GHZ_ALL, |
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 = { |
105 ATH9K_2GHZ_CH01_11, | 105 ATH9K_2GHZ_CH01_11, |
106 ATH9K_2GHZ_CH12_13, | 106 ATH9K_2GHZ_CH12_13, |
107 ATH9K_5GHZ_ALL, | 107 ATH9K_5GHZ_ALL, |
108 } | 108 } |
109 }; | 109 }; |
110 | 110 |
111 static inline bool is_wwr_sku(u16 regd) | 111 static inline bool is_wwr_sku(u16 regd) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 case 0x65: | 144 case 0x65: |
145 return &ath_world_regdom_63_65; | 145 return &ath_world_regdom_63_65; |
146 case 0x64: | 146 case 0x64: |
147 return &ath_world_regdom_64; | 147 return &ath_world_regdom_64; |
148 case 0x66: | 148 case 0x66: |
149 case 0x69: | 149 case 0x69: |
150 return &ath_world_regdom_66_69; | 150 return &ath_world_regdom_66_69; |
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 |
161 /* Frequency is one where radar detection is required */ | 162 /* Frequency is one where radar detection is required */ |
162 static bool ath_is_radar_freq(u16 center_freq) | 163 static bool ath_is_radar_freq(u16 center_freq) |
163 { | 164 { |
164 return (center_freq >= 5260 && center_freq <= 5700); | 165 return (center_freq >= 5260 && center_freq <= 5700); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 320 |
320 static void ath_reg_apply_world_flags(struct wiphy *wiphy, | 321 static void ath_reg_apply_world_flags(struct wiphy *wiphy, |
321 enum nl80211_reg_initiator initiator, | 322 enum nl80211_reg_initiator initiator, |
322 struct ath_regulatory *reg) | 323 struct ath_regulatory *reg) |
323 { | 324 { |
324 switch (reg->regpair->regDmnEnum) { | 325 switch (reg->regpair->regDmnEnum) { |
325 case 0x60: | 326 case 0x60: |
326 case 0x63: | 327 case 0x63: |
327 case 0x66: | 328 case 0x66: |
328 case 0x67: | 329 case 0x67: |
| 330 case 0x6C: |
329 ath_reg_apply_beaconing_flags(wiphy, initiator); | 331 ath_reg_apply_beaconing_flags(wiphy, initiator); |
330 break; | 332 break; |
331 case 0x68: | 333 case 0x68: |
332 ath_reg_apply_beaconing_flags(wiphy, initiator); | 334 ath_reg_apply_beaconing_flags(wiphy, initiator); |
333 ath_reg_apply_active_scan_flags(wiphy, initiator); | 335 ath_reg_apply_active_scan_flags(wiphy, initiator); |
334 break; | 336 break; |
335 } | 337 } |
336 } | 338 } |
337 | 339 |
338 int ath_reg_notifier_apply(struct wiphy *wiphy, | 340 int ath_reg_notifier_apply(struct wiphy *wiphy, |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 switch (band) { | 590 switch (band) { |
589 case IEEE80211_BAND_2GHZ: | 591 case IEEE80211_BAND_2GHZ: |
590 return reg->regpair->reg_2ghz_ctl; | 592 return reg->regpair->reg_2ghz_ctl; |
591 case IEEE80211_BAND_5GHZ: | 593 case IEEE80211_BAND_5GHZ: |
592 return reg->regpair->reg_5ghz_ctl; | 594 return reg->regpair->reg_5ghz_ctl; |
593 default: | 595 default: |
594 return NO_CTL; | 596 return NO_CTL; |
595 } | 597 } |
596 } | 598 } |
597 EXPORT_SYMBOL(ath_regd_get_band_ctl); | 599 EXPORT_SYMBOL(ath_regd_get_band_ctl); |
OLD | NEW |