diff options
author | cnssbldsw <cnssbldsw@qualcomm.com> | 2023-12-20 14:55:54 +0800 |
---|---|---|
committer | Pierre-Loup A. Griffais <git@plagman.net> | 2023-12-26 18:45:21 -0800 |
commit | d9790ec9e288931bd83c14dd24620c541945fbea (patch) | |
tree | b5367c85a47a669b9f6fca57ff06c16bc4c0dc81 /drivers | |
parent | fe7a7dc337678b2c4b943880dbac8748976a2343 (diff) | |
download | linux-d9790ec9e288931bd83c14dd24620c541945fbea.tar.gz |
wifi: ath11k: fix firmware crash due to invalid nss
Signed-off-by: cnssbldsw <cnssbldsw@qualcomm.com> (cherry picked from commit 1c2b795d3e39b17476a3fb5b028fec1375d5a323)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath11k/mac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index e7b3b0dfe8f3..6bc6f4e9b03c 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -2304,7 +2304,7 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar, he_mcs_mask[i]) max_nss = i + 1; } - arg->peer_nss = min(sta->deflink.rx_nss, max_nss); + arg->peer_nss = min(arg->peer_nss, (u32)max_nss); if (arg->peer_phymode == MODE_11AX_HE160 || arg->peer_phymode == MODE_11AX_HE80_80) { @@ -4443,6 +4443,7 @@ static void ath11k_sta_rc_update_wk(struct work_struct *wk) nss = min(nss, max(max(ath11k_mac_max_ht_nss(ht_mcs_mask), ath11k_mac_max_vht_nss(vht_mcs_mask)), ath11k_mac_max_he_nss(he_mcs_mask))); + nss = min(nss, (u32)ar->num_tx_chains); if (changed & IEEE80211_RC_BW_CHANGED) { /* Get the peer phymode */ |