]> git.itanic.dy.fi Git - linux-stable/commitdiff
ath10k: use station's current operating mode from assoc request
authorVivek Natarajan <nataraja@qti.qualcomm.com>
Tue, 6 Oct 2015 12:19:34 +0000 (15:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Dec 2015 19:31:19 +0000 (14:31 -0500)
commit 72f8cef5d1155209561b01e092ce1a04ad50c4cb upstream.

The current number of spatial streams used by the client is advertised
as a separate IE in assoc request. Use this information to set
the NSS operating mode.

Fixes: 45c9abc059fa ("ath10k: implement more versatile set_bitrate_mask").
Signed-off-by: Vivek Natarajan <nataraja@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/ath10k/mac.c

index 0d3c474ff76d29f37a349676a8862394e0c73051..6b19f778bdb02b94aaa8c76470ebe63711e9fef4 100644 (file)
@@ -2070,7 +2070,8 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar,
        enum ieee80211_band band;
        const u8 *ht_mcs_mask;
        const u16 *vht_mcs_mask;
-       int i, n, max_nss;
+       int i, n;
+       u8 max_nss;
        u32 stbc;
 
        lockdep_assert_held(&ar->conf_mutex);
@@ -2155,7 +2156,7 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar,
                        arg->peer_ht_rates.rates[i] = i;
        } else {
                arg->peer_ht_rates.num_rates = n;
-               arg->peer_num_spatial_streams = max_nss;
+               arg->peer_num_spatial_streams = min(sta->rx_nss, max_nss);
        }
 
        ath10k_dbg(ar, ATH10K_DBG_MAC, "mac ht peer %pM mcs cnt %d nss %d\n",