diff options
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/channel.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/brcm80211/brcmsmac/channel.c index 2d365d3486df..9a4c63f927cb 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c | |||
@@ -763,20 +763,17 @@ void brcms_c_regd_init(struct brcms_c_info *wlc) | |||
763 | int band_idx, i; | 763 | int band_idx, i; |
764 | 764 | ||
765 | /* Disable any channels not supported by the phy */ | 765 | /* Disable any channels not supported by the phy */ |
766 | for (band_idx = 0; band_idx < IEEE80211_NUM_BANDS; band_idx++) { | 766 | for (band_idx = 0; band_idx < wlc->pub->_nbands; band_idx++) { |
767 | if (band_idx == IEEE80211_BAND_2GHZ) | 767 | band = wlc->bandstate[band_idx]; |
768 | band = wlc->bandstate[BAND_2G_INDEX]; | ||
769 | else | ||
770 | band = wlc->bandstate[BAND_5G_INDEX]; | ||
771 | |||
772 | /* skip if band not initialized */ | ||
773 | if (band->pi == NULL) | ||
774 | continue; | ||
775 | 768 | ||
776 | wlc_phy_chanspec_band_validch(band->pi, band->bandtype, | 769 | wlc_phy_chanspec_band_validch(band->pi, band->bandtype, |
777 | &sup_chan); | 770 | &sup_chan); |
778 | 771 | ||
779 | sband = wiphy->bands[band_idx]; | 772 | if (band_idx == BAND_2G_INDEX) |
773 | sband = wiphy->bands[IEEE80211_BAND_2GHZ]; | ||
774 | else | ||
775 | sband = wiphy->bands[IEEE80211_BAND_5GHZ]; | ||
776 | |||
780 | for (i = 0; i < sband->n_channels; i++) { | 777 | for (i = 0; i < sband->n_channels; i++) { |
781 | ch = &sband->channels[i]; | 778 | ch = &sband->channels[i]; |
782 | if (!isset(sup_chan.vec, ch->hw_value)) | 779 | if (!isset(sup_chan.vec, ch->hw_value)) |