diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2014-07-08 09:11:10 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-07-15 15:51:41 -0400 |
commit | 3695b9324ee9bb801d7e0e76fa991683997758d6 (patch) | |
tree | 0c140504431710d9abf8011f52a08ca14c7e0798 /drivers/net/wireless/b43/main.c | |
parent | 785e7dbb75d2b3109daad37a261b9b66ece393c0 (diff) |
b43: enable radio 0x2057 rev 9 (AKA BCM43228) support
Support for N-PHY rev 8 with 0x2057 rev 5 is almost ready, but we still
need to figure out how to handle rev 9 first.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 8dd69a3ae7ac..ad335307a3d4 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -210,6 +210,9 @@ static struct ieee80211_channel b43_2ghz_chantable[] = { | |||
210 | CHAN2G(13, 2472, 0), | 210 | CHAN2G(13, 2472, 0), |
211 | CHAN2G(14, 2484, 0), | 211 | CHAN2G(14, 2484, 0), |
212 | }; | 212 | }; |
213 | |||
214 | /* No support for the last 3 channels (12, 13, 14) */ | ||
215 | #define b43_2ghz_chantable_limited_size 11 | ||
213 | #undef CHAN2G | 216 | #undef CHAN2G |
214 | 217 | ||
215 | #define CHAN4G(_channel, _flags) { \ | 218 | #define CHAN4G(_channel, _flags) { \ |
@@ -335,6 +338,14 @@ static struct ieee80211_supported_band b43_band_2GHz = { | |||
335 | .n_bitrates = b43_g_ratetable_size, | 338 | .n_bitrates = b43_g_ratetable_size, |
336 | }; | 339 | }; |
337 | 340 | ||
341 | static struct ieee80211_supported_band b43_band_2ghz_limited = { | ||
342 | .band = IEEE80211_BAND_2GHZ, | ||
343 | .channels = b43_2ghz_chantable, | ||
344 | .n_channels = b43_2ghz_chantable_limited_size, | ||
345 | .bitrates = b43_g_ratetable, | ||
346 | .n_bitrates = b43_g_ratetable_size, | ||
347 | }; | ||
348 | |||
338 | static void b43_wireless_core_exit(struct b43_wldev *dev); | 349 | static void b43_wireless_core_exit(struct b43_wldev *dev); |
339 | static int b43_wireless_core_init(struct b43_wldev *dev); | 350 | static int b43_wireless_core_init(struct b43_wldev *dev); |
340 | static struct b43_wldev * b43_wireless_core_stop(struct b43_wldev *dev); | 351 | static struct b43_wldev * b43_wireless_core_stop(struct b43_wldev *dev); |
@@ -4459,7 +4470,10 @@ static int b43_phy_versioning(struct b43_wldev *dev) | |||
4459 | unsupported = 1; | 4470 | unsupported = 1; |
4460 | break; | 4471 | break; |
4461 | case B43_PHYTYPE_N: | 4472 | case B43_PHYTYPE_N: |
4462 | if (radio_ver != 0x2055 && radio_ver != 0x2056) | 4473 | if (radio_ver != 0x2055 && radio_ver != 0x2056 && |
4474 | radio_ver != 0x2057) | ||
4475 | unsupported = 1; | ||
4476 | if (radio_ver == 0x2057 && !(radio_rev == 9)) | ||
4463 | unsupported = 1; | 4477 | unsupported = 1; |
4464 | break; | 4478 | break; |
4465 | case B43_PHYTYPE_LP: | 4479 | case B43_PHYTYPE_LP: |
@@ -5095,9 +5109,15 @@ static int b43_setup_bands(struct b43_wldev *dev, | |||
5095 | bool have_2ghz_phy, bool have_5ghz_phy) | 5109 | bool have_2ghz_phy, bool have_5ghz_phy) |
5096 | { | 5110 | { |
5097 | struct ieee80211_hw *hw = dev->wl->hw; | 5111 | struct ieee80211_hw *hw = dev->wl->hw; |
5112 | struct b43_phy *phy = &dev->phy; | ||
5113 | bool limited_2g; | ||
5114 | |||
5115 | /* We don't support all 2 GHz channels on some devices */ | ||
5116 | limited_2g = phy->radio_ver == 0x2057 && phy->radio_rev == 9; | ||
5098 | 5117 | ||
5099 | if (have_2ghz_phy) | 5118 | if (have_2ghz_phy) |
5100 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &b43_band_2GHz; | 5119 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = limited_2g ? |
5120 | &b43_band_2ghz_limited : &b43_band_2GHz; | ||
5101 | if (dev->phy.type == B43_PHYTYPE_N) { | 5121 | if (dev->phy.type == B43_PHYTYPE_N) { |
5102 | if (have_5ghz_phy) | 5122 | if (have_5ghz_phy) |
5103 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &b43_band_5GHz_nphy; | 5123 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &b43_band_5GHz_nphy; |