From: Marek Kwaczynski Date: Mon, 10 Feb 2014 10:25:25 +0000 (+0100) Subject: ath10k: Set proper nss value for the peer X-Git-Tag: next-20140306~62^2~114^2~13 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=36786024df993f0fb5e7d1b56058c4f48f24d5e8;p=karo-tx-linux.git ath10k: Set proper nss value for the peer It was found during testing the nss calculation does not cover all corner cases. Station could request eq. only MCS8 and MCS9 (nss=2 specific). Next num_rates=2 so the driver sets nss=(max((2+7)/8, 1))=1. Which is wrong. The in-driver calculation was introduced prior (commit ddcc347b70 mac80211: fix rx_nss calculation for drivers with hw rc). Since it's fixed, use mac80211 provided value from now. End user will experience lower throuhputs than expected if the nss is wrongly calculated. Signed-off-by: Marek Kwaczynski Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 144b4d605267..e6bf2e8da770 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1149,7 +1149,7 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar, arg->peer_ht_rates.rates[n++] = i; arg->peer_ht_rates.num_rates = n; - arg->peer_num_spatial_streams = max((n+7) / 8, 1); + arg->peer_num_spatial_streams = sta->rx_nss; ath10k_dbg(ATH10K_DBG_MAC, "mac ht peer %pM mcs cnt %d nss %d\n", arg->addr,