diff mbox

ath10k: fix num_legacy_stations tracking

Message ID 1409212779-5212-1-git-send-email-michal.kazior@tieto.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Michal Kazior Aug. 28, 2014, 7:59 a.m. UTC
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>
---
 drivers/net/wireless/ath/ath10k/mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo Sept. 2, 2014, 7:17 a.m. UTC | #1
Michal Kazior <michal.kazior@tieto.com> writes:

> 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>

Thanks, applied.
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index b858c82..4e30e57 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -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) {