Commit f0b147b8 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by Kalle Valo

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: default avatarAmitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: default avatarSiva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 1e9c410f
...@@ -1957,8 +1957,6 @@ int rsi_mac80211_attach(struct rsi_common *common) ...@@ -1957,8 +1957,6 @@ int rsi_mac80211_attach(struct rsi_common *common)
hw->max_tx_aggregation_subframes = RSI_MAX_TX_AGGR_FRMS; hw->max_tx_aggregation_subframes = RSI_MAX_TX_AGGR_FRMS;
hw->max_rx_aggregation_subframes = RSI_MAX_RX_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"; hw->rate_control_algorithm = "AARF";
SET_IEEE80211_PERM_ADDR(hw, common->mac_addr); SET_IEEE80211_PERM_ADDR(hw, common->mac_addr);
...@@ -1979,10 +1977,15 @@ int rsi_mac80211_attach(struct rsi_common *common) ...@@ -1979,10 +1977,15 @@ int rsi_mac80211_attach(struct rsi_common *common)
wiphy->available_antennas_rx = 1; wiphy->available_antennas_rx = 1;
wiphy->available_antennas_tx = 1; wiphy->available_antennas_tx = 1;
rsi_register_rates_channels(adapter, NL80211_BAND_2GHZ);
wiphy->bands[NL80211_BAND_2GHZ] = wiphy->bands[NL80211_BAND_2GHZ] =
&adapter->sbands[NL80211_BAND_2GHZ]; &adapter->sbands[NL80211_BAND_2GHZ];
wiphy->bands[NL80211_BAND_5GHZ] = if (common->num_supp_bands > 1) {
&adapter->sbands[NL80211_BAND_5GHZ]; rsi_register_rates_channels(adapter, NL80211_BAND_5GHZ);
wiphy->bands[NL80211_BAND_5GHZ] =
&adapter->sbands[NL80211_BAND_5GHZ];
}
/* AP Parameters */ /* AP Parameters */
wiphy->max_ap_assoc_sta = rsi_max_ap_stas[common->oper_mode - 1]; wiphy->max_ap_assoc_sta = rsi_max_ap_stas[common->oper_mode - 1];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment