diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2014-05-21 02:44:20 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-05-22 14:04:36 -0400 |
commit | 91211739b29e74c367ee459a80fe8812d956fb3d (patch) | |
tree | 4be92d62768a1eed81ef0c0c88c23e4dfc66b651 | |
parent | e9cdcb74236c8dd5a6faed6aeac07fe192401fc7 (diff) |
b43: fix list of 5 GHz channels for 802.11n cards
Broadcom hardware uses a bit tricky hw_value-s for 5 GHz channels,
values 184-228 are used for 4920-5140 MHz center frequencies. Normally
you expect channels 7-16 (e.g. 5060 MHz is channel 12, not 212). We never
meant to register hw_value 228 with freq 6140 MHz (5000 + 228 * 5).
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/b43/main.c | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index ada42dcf81bc..3d67e6b08e1c 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -208,6 +208,14 @@ static struct ieee80211_channel b43_2ghz_chantable[] = { | |||
208 | }; | 208 | }; |
209 | #undef CHAN2G | 209 | #undef CHAN2G |
210 | 210 | ||
211 | #define CHAN4G(_channel, _flags) { \ | ||
212 | .band = IEEE80211_BAND_5GHZ, \ | ||
213 | .center_freq = 4000 + (5 * (_channel)), \ | ||
214 | .hw_value = (_channel), \ | ||
215 | .flags = (_flags), \ | ||
216 | .max_antenna_gain = 0, \ | ||
217 | .max_power = 30, \ | ||
218 | } | ||
211 | #define CHAN5G(_channel, _flags) { \ | 219 | #define CHAN5G(_channel, _flags) { \ |
212 | .band = IEEE80211_BAND_5GHZ, \ | 220 | .band = IEEE80211_BAND_5GHZ, \ |
213 | .center_freq = 5000 + (5 * (_channel)), \ | 221 | .center_freq = 5000 + (5 * (_channel)), \ |
@@ -217,6 +225,18 @@ static struct ieee80211_channel b43_2ghz_chantable[] = { | |||
217 | .max_power = 30, \ | 225 | .max_power = 30, \ |
218 | } | 226 | } |
219 | static struct ieee80211_channel b43_5ghz_nphy_chantable[] = { | 227 | static struct ieee80211_channel b43_5ghz_nphy_chantable[] = { |
228 | CHAN4G(184, 0), CHAN4G(186, 0), | ||
229 | CHAN4G(188, 0), CHAN4G(190, 0), | ||
230 | CHAN4G(192, 0), CHAN4G(194, 0), | ||
231 | CHAN4G(196, 0), CHAN4G(198, 0), | ||
232 | CHAN4G(200, 0), CHAN4G(202, 0), | ||
233 | CHAN4G(204, 0), CHAN4G(206, 0), | ||
234 | CHAN4G(208, 0), CHAN4G(210, 0), | ||
235 | CHAN4G(212, 0), CHAN4G(214, 0), | ||
236 | CHAN4G(216, 0), CHAN4G(218, 0), | ||
237 | CHAN4G(220, 0), CHAN4G(222, 0), | ||
238 | CHAN4G(224, 0), CHAN4G(226, 0), | ||
239 | CHAN4G(228, 0), | ||
220 | CHAN5G(32, 0), CHAN5G(34, 0), | 240 | CHAN5G(32, 0), CHAN5G(34, 0), |
221 | CHAN5G(36, 0), CHAN5G(38, 0), | 241 | CHAN5G(36, 0), CHAN5G(38, 0), |
222 | CHAN5G(40, 0), CHAN5G(42, 0), | 242 | CHAN5G(40, 0), CHAN5G(42, 0), |
@@ -260,18 +280,7 @@ static struct ieee80211_channel b43_5ghz_nphy_chantable[] = { | |||
260 | CHAN5G(170, 0), CHAN5G(172, 0), | 280 | CHAN5G(170, 0), CHAN5G(172, 0), |
261 | CHAN5G(174, 0), CHAN5G(176, 0), | 281 | CHAN5G(174, 0), CHAN5G(176, 0), |
262 | CHAN5G(178, 0), CHAN5G(180, 0), | 282 | CHAN5G(178, 0), CHAN5G(180, 0), |
263 | CHAN5G(182, 0), CHAN5G(184, 0), | 283 | CHAN5G(182, 0), |
264 | CHAN5G(186, 0), CHAN5G(188, 0), | ||
265 | CHAN5G(190, 0), CHAN5G(192, 0), | ||
266 | CHAN5G(194, 0), CHAN5G(196, 0), | ||
267 | CHAN5G(198, 0), CHAN5G(200, 0), | ||
268 | CHAN5G(202, 0), CHAN5G(204, 0), | ||
269 | CHAN5G(206, 0), CHAN5G(208, 0), | ||
270 | CHAN5G(210, 0), CHAN5G(212, 0), | ||
271 | CHAN5G(214, 0), CHAN5G(216, 0), | ||
272 | CHAN5G(218, 0), CHAN5G(220, 0), | ||
273 | CHAN5G(222, 0), CHAN5G(224, 0), | ||
274 | CHAN5G(226, 0), CHAN5G(228, 0), | ||
275 | }; | 284 | }; |
276 | 285 | ||
277 | static struct ieee80211_channel b43_5ghz_aphy_chantable[] = { | 286 | static struct ieee80211_channel b43_5ghz_aphy_chantable[] = { |
@@ -295,6 +304,7 @@ static struct ieee80211_channel b43_5ghz_aphy_chantable[] = { | |||
295 | CHAN5G(208, 0), CHAN5G(212, 0), | 304 | CHAN5G(208, 0), CHAN5G(212, 0), |
296 | CHAN5G(216, 0), | 305 | CHAN5G(216, 0), |
297 | }; | 306 | }; |
307 | #undef CHAN4G | ||
298 | #undef CHAN5G | 308 | #undef CHAN5G |
299 | 309 | ||
300 | static struct ieee80211_supported_band b43_band_5GHz_nphy = { | 310 | static struct ieee80211_supported_band b43_band_5GHz_nphy = { |