From: Michal Kazior Date: Thu, 28 Aug 2014 07:59:39 +0000 (+0200) Subject: ath10k: fix num_legacy_stations tracking X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a4841eb6392e14a5070e633de30637342f6578d2;p=openwrt%2Fstaging%2Fblogic.git ath10k: fix num_legacy_stations tracking 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 Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index b858c8288196..4e30e577b3ed 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) {