Calculating STA NSS just from the mcs rateset is not the greatest idea. This should prevent connectivity issues if mac80211 is ever to set rx_nss to something other rather than base on max mcs map. As an example operation mode change notification in assoc request may change rx_nss initial values in the future. Signed-off-by: Michal Kazior <michal.kazior@xxxxxxxxx> --- drivers/net/wireless/ath/ath10k/mac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index b70a3b2..15eda44 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -925,7 +925,7 @@ static void ath10k_peer_assoc_h_basic(struct ath10k *ar, else arg->peer_listen_intval = ar->hw->conf.listen_interval; - arg->peer_num_spatial_streams = 1; + arg->peer_num_spatial_streams = max_t(u32, 1, sta->rx_nss); /* * The assoc capabilities are available only in managed mode. @@ -1075,7 +1075,6 @@ 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); ath10k_dbg(ATH10K_DBG_MAC, "mac ht peer %pM mcs cnt %d nss %d\n", arg->addr, -- 1.8.4.rc3 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html