diff options
| author | Rafał Miłecki <zajec5@gmail.com> | 2014-07-23 12:54:49 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2014-07-23 13:08:36 -0400 |
| commit | b453fda6bad14d1932ef35356c860f3bfd6d9d6d (patch) | |
| tree | 679dfc5024f604762ddd6fdd1dca30dd0e3a4cd1 /drivers/net/wireless/b43 | |
| parent | e31cd3be75115afcd9372c420c6359be7652610f (diff) | |
b43: register limited amount of 5G channels for BCM43228
We don't have all needed channel tables due to RE process for this
device.
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')
| -rw-r--r-- | drivers/net/wireless/b43/main.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 47b6fa5fa5b2..3b4b192c0792 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
| @@ -290,6 +290,14 @@ static struct ieee80211_channel b43_5ghz_nphy_chantable[] = { | |||
| 290 | CHAN5G(182, 0), | 290 | CHAN5G(182, 0), |
| 291 | }; | 291 | }; |
| 292 | 292 | ||
| 293 | static struct ieee80211_channel b43_5ghz_nphy_chantable_limited[] = { | ||
| 294 | CHAN5G(36, 0), CHAN5G(40, 0), | ||
| 295 | CHAN5G(44, 0), CHAN5G(48, 0), | ||
| 296 | CHAN5G(149, 0), CHAN5G(153, 0), | ||
| 297 | CHAN5G(157, 0), CHAN5G(161, 0), | ||
| 298 | CHAN5G(165, 0), | ||
| 299 | }; | ||
| 300 | |||
| 293 | static struct ieee80211_channel b43_5ghz_aphy_chantable[] = { | 301 | static struct ieee80211_channel b43_5ghz_aphy_chantable[] = { |
| 294 | CHAN5G(34, 0), CHAN5G(36, 0), | 302 | CHAN5G(34, 0), CHAN5G(36, 0), |
| 295 | CHAN5G(38, 0), CHAN5G(40, 0), | 303 | CHAN5G(38, 0), CHAN5G(40, 0), |
| @@ -322,6 +330,14 @@ static struct ieee80211_supported_band b43_band_5GHz_nphy = { | |||
| 322 | .n_bitrates = b43_a_ratetable_size, | 330 | .n_bitrates = b43_a_ratetable_size, |
| 323 | }; | 331 | }; |
| 324 | 332 | ||
| 333 | static struct ieee80211_supported_band b43_band_5GHz_nphy_limited = { | ||
| 334 | .band = IEEE80211_BAND_5GHZ, | ||
| 335 | .channels = b43_5ghz_nphy_chantable_limited, | ||
| 336 | .n_channels = ARRAY_SIZE(b43_5ghz_nphy_chantable_limited), | ||
| 337 | .bitrates = b43_a_ratetable, | ||
| 338 | .n_bitrates = b43_a_ratetable_size, | ||
| 339 | }; | ||
| 340 | |||
| 325 | static struct ieee80211_supported_band b43_band_5GHz_aphy = { | 341 | static struct ieee80211_supported_band b43_band_5GHz_aphy = { |
| 326 | .band = IEEE80211_BAND_5GHZ, | 342 | .band = IEEE80211_BAND_5GHZ, |
| 327 | .channels = b43_5ghz_aphy_chantable, | 343 | .channels = b43_5ghz_aphy_chantable, |
| @@ -5155,17 +5171,22 @@ static int b43_setup_bands(struct b43_wldev *dev, | |||
| 5155 | struct ieee80211_hw *hw = dev->wl->hw; | 5171 | struct ieee80211_hw *hw = dev->wl->hw; |
| 5156 | struct b43_phy *phy = &dev->phy; | 5172 | struct b43_phy *phy = &dev->phy; |
| 5157 | bool limited_2g; | 5173 | bool limited_2g; |
| 5174 | bool limited_5g; | ||
| 5158 | 5175 | ||
| 5159 | /* We don't support all 2 GHz channels on some devices */ | 5176 | /* We don't support all 2 GHz channels on some devices */ |
| 5160 | limited_2g = phy->radio_ver == 0x2057 && | 5177 | limited_2g = phy->radio_ver == 0x2057 && |
| 5161 | (phy->radio_rev == 9 || phy->radio_rev == 14); | 5178 | (phy->radio_rev == 9 || phy->radio_rev == 14); |
| 5179 | limited_5g = phy->radio_ver == 0x2057 && | ||
| 5180 | phy->radio_rev == 9; | ||
| 5162 | 5181 | ||
| 5163 | if (have_2ghz_phy) | 5182 | if (have_2ghz_phy) |
| 5164 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = limited_2g ? | 5183 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = limited_2g ? |
| 5165 | &b43_band_2ghz_limited : &b43_band_2GHz; | 5184 | &b43_band_2ghz_limited : &b43_band_2GHz; |
| 5166 | if (dev->phy.type == B43_PHYTYPE_N) { | 5185 | if (dev->phy.type == B43_PHYTYPE_N) { |
| 5167 | if (have_5ghz_phy) | 5186 | if (have_5ghz_phy) |
| 5168 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &b43_band_5GHz_nphy; | 5187 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = limited_5g ? |
| 5188 | &b43_band_5GHz_nphy_limited : | ||
| 5189 | &b43_band_5GHz_nphy; | ||
| 5169 | } else { | 5190 | } else { |
| 5170 | if (have_5ghz_phy) | 5191 | if (have_5ghz_phy) |
| 5171 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &b43_band_5GHz_aphy; | 5192 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &b43_band_5GHz_aphy; |
