]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath10k: fix num_legacy_stations tracking
authorMichal Kazior <michal.kazior@tieto.com>
Thu, 28 Aug 2014 07:59:39 +0000 (09:59 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 2 Sep 2014 07:16:54 +0000 (10:16 +0300)
If a station was reassociated, i.e. due to change
of supported rates update via sta_rc_update() the
num_legacy_stations would be (incorrectly) bumped
up leading to unbalanced usage of the var. This in
turn could lock rtscts protection up as enabled.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/mac.c

index b858c8288196228c426e9f930586f63b774e7e78..4e30e577b3ed8dc68d9354d9fc9a657defb5806d 100644 (file)
@@ -1615,7 +1615,7 @@ static int ath10k_station_assoc(struct ath10k *ar, struct ath10k_vif *arvif,
                return ret;
        }
 
-       if (!sta->wme) {
+       if (!sta->wme && !reassoc) {
                arvif->num_legacy_stations++;
                ret  = ath10k_recalc_rtscts_prot(arvif);
                if (ret) {