diff options
author | Amitkumar Karwar <amit.karwar@redpinesignals.com> | 2018-04-10 20:34:17 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-04-24 20:25:19 +0300 |
commit | f0b147b8f1d27c9fa543704b21c67a7a3723c7d2 (patch) | |
tree | 0a6b1613b0e13c5a24ff0583a0df1dda57e86a93 /drivers/net/wireless/rsi/rsi_91x_mac80211.c | |
parent | 1e9c410f26a2ec3201b0f10141275afcbdaf6b69 (diff) | |
download | op-kernel-dev-f0b147b8f1d27c9fa543704b21c67a7a3723c7d2.zip op-kernel-dev-f0b147b8f1d27c9fa543704b21c67a7a3723c7d2.tar.gz |
rsi: advertise 5GHz support based on device capability
Currently 5GHz gets advertised even for the device which supports
only 2.4Ghz band. This patch fixes the issue
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/rsi/rsi_91x_mac80211.c')
-rw-r--r-- | drivers/net/wireless/rsi/rsi_91x_mac80211.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c index bb497bd..766d874 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c @@ -1957,8 +1957,6 @@ int rsi_mac80211_attach(struct rsi_common *common) hw->max_tx_aggregation_subframes = RSI_MAX_TX_AGGR_FRMS; hw->max_rx_aggregation_subframes = RSI_MAX_RX_AGGR_FRMS; - rsi_register_rates_channels(adapter, NL80211_BAND_2GHZ); - rsi_register_rates_channels(adapter, NL80211_BAND_5GHZ); hw->rate_control_algorithm = "AARF"; SET_IEEE80211_PERM_ADDR(hw, common->mac_addr); @@ -1979,10 +1977,15 @@ int rsi_mac80211_attach(struct rsi_common *common) wiphy->available_antennas_rx = 1; wiphy->available_antennas_tx = 1; + + rsi_register_rates_channels(adapter, NL80211_BAND_2GHZ); wiphy->bands[NL80211_BAND_2GHZ] = &adapter->sbands[NL80211_BAND_2GHZ]; - wiphy->bands[NL80211_BAND_5GHZ] = - &adapter->sbands[NL80211_BAND_5GHZ]; + if (common->num_supp_bands > 1) { + rsi_register_rates_channels(adapter, NL80211_BAND_5GHZ); + wiphy->bands[NL80211_BAND_5GHZ] = + &adapter->sbands[NL80211_BAND_5GHZ]; + } /* AP Parameters */ wiphy->max_ap_assoc_sta = rsi_max_ap_stas[common->oper_mode - 1]; |