iwlwifi: use valid TX/RX antenna from hw_params
It's not really a good idea to write to the global static configuration. Use the valid TX/RX antenna information only from the HW params struct except in the case where the values from the config are used to override the values from the EEPROM. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

szülő
54708d8df3
commit
7e79a3937a
@@ -131,14 +131,13 @@ static void iwl1000_hw_set_hw_params(struct iwl_priv *priv)
|
||||
|
||||
hw_params(priv).ht40_channel = BIT(IEEE80211_BAND_2GHZ);
|
||||
|
||||
hw_params(priv).tx_chains_num = num_of_ant(cfg(priv)->valid_tx_ant);
|
||||
hw_params(priv).tx_chains_num =
|
||||
num_of_ant(hw_params(priv).valid_tx_ant);
|
||||
if (cfg(priv)->rx_with_siso_diversity)
|
||||
hw_params(priv).rx_chains_num = 1;
|
||||
else
|
||||
hw_params(priv).rx_chains_num =
|
||||
num_of_ant(cfg(priv)->valid_rx_ant);
|
||||
hw_params(priv).valid_tx_ant = cfg(priv)->valid_tx_ant;
|
||||
hw_params(priv).valid_rx_ant = cfg(priv)->valid_rx_ant;
|
||||
num_of_ant(hw_params(priv).valid_rx_ant);
|
||||
|
||||
iwl1000_set_ct_threshold(priv);
|
||||
|
||||
|
Reference in New Issue
Block a user