Commit b116ea19 authored by Ben Greear's avatar Ben Greear Committed by Kalle Valo

ath10k: use configured nss instead of max nss

When re-associating a station, the nss was set back to
maximum value even if user had configured small number
of tx chains.  So, pay attention to user's config in
this case as well.
Signed-off-by: default avatarBen Greear <greearb@candelatech.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 5572a95b
...@@ -4147,6 +4147,10 @@ ath10k_default_bitrate_mask(struct ath10k *ar, ...@@ -4147,6 +4147,10 @@ ath10k_default_bitrate_mask(struct ath10k *ar,
u32 legacy = 0x00ff; u32 legacy = 0x00ff;
u8 ht = 0xff, i; u8 ht = 0xff, i;
u16 vht = 0x3ff; u16 vht = 0x3ff;
u16 nrf = ar->num_rf_chains;
if (ar->cfg_tx_chainmask)
nrf = get_nss_from_chainmask(ar->cfg_tx_chainmask);
switch (band) { switch (band) {
case IEEE80211_BAND_2GHZ: case IEEE80211_BAND_2GHZ:
...@@ -4162,11 +4166,11 @@ ath10k_default_bitrate_mask(struct ath10k *ar, ...@@ -4162,11 +4166,11 @@ ath10k_default_bitrate_mask(struct ath10k *ar,
if (mask->control[band].legacy != legacy) if (mask->control[band].legacy != legacy)
return false; return false;
for (i = 0; i < ar->num_rf_chains; i++) for (i = 0; i < nrf; i++)
if (mask->control[band].ht_mcs[i] != ht) if (mask->control[band].ht_mcs[i] != ht)
return false; return false;
for (i = 0; i < ar->num_rf_chains; i++) for (i = 0; i < nrf; i++)
if (mask->control[band].vht_mcs[i] != vht) if (mask->control[band].vht_mcs[i] != vht)
return false; return false;
...@@ -4417,6 +4421,9 @@ static int ath10k_set_bitrate_mask(struct ieee80211_hw *hw, ...@@ -4417,6 +4421,9 @@ static int ath10k_set_bitrate_mask(struct ieee80211_hw *hw,
u8 fixed_nss = ar->num_rf_chains; u8 fixed_nss = ar->num_rf_chains;
u8 force_sgi; u8 force_sgi;
if (ar->cfg_tx_chainmask)
fixed_nss = get_nss_from_chainmask(ar->cfg_tx_chainmask);
force_sgi = mask->control[band].gi; force_sgi = mask->control[band].gi;
if (force_sgi == NL80211_TXRATE_FORCE_LGI) if (force_sgi == NL80211_TXRATE_FORCE_LGI)
return -EINVAL; return -EINVAL;
......
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