diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-05-02 00:37:17 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-20 14:46:22 -0400 |
commit | 038659e7c6b385065cb223872771ac437ef70b62 (patch) | |
tree | df9e86adcc611d10ed5f98672421bffe1f43989f /include/net/cfg80211.h | |
parent | 97bc54152e3a91dd2dc297e8a084c05e93527e60 (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 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 9e17a83d3432..282d58d52fce 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -70,6 +70,9 @@ enum ieee80211_channel_flags { | |||
70 | IEEE80211_CHAN_NO_FAT_BELOW = 1<<5, | 70 | IEEE80211_CHAN_NO_FAT_BELOW = 1<<5, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | #define IEEE80211_CHAN_NO_HT40 \ | ||
74 | (IEEE80211_CHAN_NO_FAT_ABOVE | IEEE80211_CHAN_NO_FAT_BELOW) | ||
75 | |||
73 | /** | 76 | /** |
74 | * struct ieee80211_channel - channel definition | 77 | * struct ieee80211_channel - channel definition |
75 | * | 78 | * |
@@ -1303,9 +1306,10 @@ extern void wiphy_apply_custom_regulatory( | |||
1303 | * freq_reg_info - get regulatory information for the given frequency | 1306 | * freq_reg_info - get regulatory information for the given frequency |
1304 | * @wiphy: the wiphy for which we want to process this rule for | 1307 | * @wiphy: the wiphy for which we want to process this rule for |
1305 | * @center_freq: Frequency in KHz for which we want regulatory information for | 1308 | * @center_freq: Frequency in KHz for which we want regulatory information for |
1306 | * @bandwidth: the bandwidth requirement you have in KHz, if you do not have one | 1309 | * @desired_bw_khz: the desired max bandwidth you want to use per |
1307 | * you can set this to 0. If this frequency is allowed we then set | 1310 | * channel. Note that this is still 20 MHz if you want to use HT40 |
1308 | * this value to the maximum allowed bandwidth. | 1311 | * as HT40 makes use of two channels for its 40 MHz width bandwidth. |
1312 | * If set to 0 we'll assume you want the standard 20 MHz. | ||
1309 | * @reg_rule: the regulatory rule which we have for this frequency | 1313 | * @reg_rule: the regulatory rule which we have for this frequency |
1310 | * | 1314 | * |
1311 | * Use this function to get the regulatory rule for a specific frequency on | 1315 | * Use this function to get the regulatory rule for a specific frequency on |
@@ -1320,7 +1324,9 @@ extern void wiphy_apply_custom_regulatory( | |||
1320 | * freq_in_rule_band() for our current definition of a band -- this is purely | 1324 | * freq_in_rule_band() for our current definition of a band -- this is purely |
1321 | * subjective and right now its 802.11 specific. | 1325 | * subjective and right now its 802.11 specific. |
1322 | */ | 1326 | */ |
1323 | extern int freq_reg_info(struct wiphy *wiphy, u32 center_freq, u32 *bandwidth, | 1327 | extern int freq_reg_info(struct wiphy *wiphy, |
1328 | u32 center_freq, | ||
1329 | u32 desired_bw_khz, | ||
1324 | const struct ieee80211_reg_rule **reg_rule); | 1330 | const struct ieee80211_reg_rule **reg_rule); |
1325 | 1331 | ||
1326 | /* | 1332 | /* |