aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/regd.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-05-02 00:37:17 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-20 14:46:22 -0400
commit038659e7c6b385065cb223872771ac437ef70b62 (patch)
treedf9e86adcc611d10ed5f98672421bffe1f43989f /drivers/net/wireless/ath/regd.c
parent97bc54152e3a91dd2dc297e8a084c05e93527e60 (diff)
cfg80211: Process regulatory max bandwidth checks for HT40
We are not correctly listening to the regulatory max bandwidth settings. To actually make use of it we need to redesign things a bit. This patch does the work for that. We do this to so we can obey to regulatory rules accordingly for use of HT40. We end up dealing with HT40 by having two passes for each channel. The first check will see if a 20 MHz channel fits into the channel's center freq on a given frequency range. We check for a 20 MHz banwidth channel as that is the maximum an individual channel will use, at least for now. The first pass will go ahead and check if the regulatory rule for that given center of frequency allows 40 MHz bandwidths and we use this to determine whether or not the channel supports HT40 or not. So to support HT40 you'll need at a regulatory rule that allows you to use 40 MHz channels but you're channel must also be enabled and support 20 MHz by itself. The second pass is done after we do the regulatory checks over an device's supported channel list. On each channel we'll check if the control channel and the extension both: o exist o are enabled o regulatory allows 40 MHz bandwidth on its frequency range This work allows allows us to idependently check for HT40- and HT40+. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/regd.c')
-rw-r--r--drivers/net/wireless/ath/regd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
index fdf07c82208..7a89f9fac7d 100644
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -200,8 +200,10 @@ ath_reg_apply_beaconing_flags(struct wiphy *wiphy,
200 continue; 200 continue;
201 201
202 if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE) { 202 if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE) {
203 r = freq_reg_info(wiphy, ch->center_freq, 203 r = freq_reg_info(wiphy,
204 &bandwidth, &reg_rule); 204 ch->center_freq,
205 bandwidth,
206 &reg_rule);
205 if (r) 207 if (r)
206 continue; 208 continue;
207 /* 209 /*
@@ -265,7 +267,7 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy,
265 */ 267 */
266 268
267 ch = &sband->channels[11]; /* CH 12 */ 269 ch = &sband->channels[11]; /* CH 12 */
268 r = freq_reg_info(wiphy, ch->center_freq, &bandwidth, &reg_rule); 270 r = freq_reg_info(wiphy, ch->center_freq, bandwidth, &reg_rule);
269 if (!r) { 271 if (!r) {
270 if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN)) 272 if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
271 if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN) 273 if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
@@ -273,7 +275,7 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy,
273 } 275 }
274 276
275 ch = &sband->channels[12]; /* CH 13 */ 277 ch = &sband->channels[12]; /* CH 13 */
276 r = freq_reg_info(wiphy, ch->center_freq, &bandwidth, &reg_rule); 278 r = freq_reg_info(wiphy, ch->center_freq, bandwidth, &reg_rule);
277 if (!r) { 279 if (!r) {
278 if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN)) 280 if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
279 if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN) 281 if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)