diff options
author | Bruno Randolf <br1@einfach.org> | 2011-01-19 04:20:57 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-21 15:35:46 -0500 |
commit | 410e6120a500edcf3fb8239301deabf20a4310db (patch) | |
tree | 1c2d23e092be7b75fabcc9d20fb04184038a7124 /drivers/net/wireless/ath/ath5k/base.c | |
parent | 0810569076c1f3cf4a82da40211dd0b07b3ad07e (diff) |
ath5k: Add 802.11j 4.9GHz channels to allowed channels
Add the 802.11j (20MHz channel width) channels to the allowed channels. This
still does not enable 802.11j in ath5k since these frequencies are out of the
configured range. A later patch will deal with that.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/base.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 6ff30d3833ee..2de8e80bfdc9 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -244,15 +244,21 @@ static int ath5k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *re | |||
244 | /* | 244 | /* |
245 | * Returns true for the channel numbers used without all_channels modparam. | 245 | * Returns true for the channel numbers used without all_channels modparam. |
246 | */ | 246 | */ |
247 | static bool ath5k_is_standard_channel(short chan) | 247 | static bool ath5k_is_standard_channel(short chan, enum ieee80211_band band) |
248 | { | 248 | { |
249 | return ((chan <= 14) || | 249 | if (band == IEEE80211_BAND_2GHZ && chan <= 14) |
250 | /* UNII 1,2 */ | 250 | return true; |
251 | ((chan & 3) == 0 && chan >= 36 && chan <= 64) || | 251 | |
252 | return /* UNII 1,2 */ | ||
253 | (((chan & 3) == 0 && chan >= 36 && chan <= 64) || | ||
252 | /* midband */ | 254 | /* midband */ |
253 | ((chan & 3) == 0 && chan >= 100 && chan <= 140) || | 255 | ((chan & 3) == 0 && chan >= 100 && chan <= 140) || |
254 | /* UNII-3 */ | 256 | /* UNII-3 */ |
255 | ((chan & 3) == 1 && chan >= 149 && chan <= 165)); | 257 | ((chan & 3) == 1 && chan >= 149 && chan <= 165) || |
258 | /* 802.11j 5.030-5.080 GHz (20MHz) */ | ||
259 | (chan == 8 || chan == 12 || chan == 16) || | ||
260 | /* 802.11j 4.9GHz (20MHz) */ | ||
261 | (chan == 184 || chan == 188 || chan == 192 || chan == 196)); | ||
256 | } | 262 | } |
257 | 263 | ||
258 | static unsigned int | 264 | static unsigned int |
@@ -296,7 +302,8 @@ ath5k_setup_channels(struct ath5k_hw *ah, | |||
296 | if (!ath5k_channel_ok(ah, freq, chfreq)) | 302 | if (!ath5k_channel_ok(ah, freq, chfreq)) |
297 | continue; | 303 | continue; |
298 | 304 | ||
299 | if (!modparam_all_channels && !ath5k_is_standard_channel(ch)) | 305 | if (!modparam_all_channels && |
306 | !ath5k_is_standard_channel(ch, band)) | ||
300 | continue; | 307 | continue; |
301 | 308 | ||
302 | /* Write channel info and increment counter */ | 309 | /* Write channel info and increment counter */ |