summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorZhi Chen <zhichen@codeaurora.org>2019-11-06 21:04:42 +0300
committerKalle Valo <kvalo@codeaurora.org>2019-11-08 11:44:17 +0300
commit402838a05def2e23736cec834752f3edcc38dda7 (patch)
tree3bea27de6b7218d5f831da928bd7f6b728a52bd2 /drivers/net/wireless
parent05a11003a56507023f18d3249a4d4d119c0a3e9c (diff)
downloadlinux-402838a05def2e23736cec834752f3edcc38dda7.tar.xz
ath10k: fix potential issue of peer stats allocation
STA number was not restored if OOM happened. Tested: QCA9984 with firmware ver 10.4-3.9.0.1-00018 Signed-off-by: Zhi Chen <zhichen@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index e8bdb2ba9b18..5e3450cfb07b 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -6604,6 +6604,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
arsta->tx_stats = kzalloc(sizeof(*arsta->tx_stats),
GFP_KERNEL);
if (!arsta->tx_stats) {
+ ath10k_mac_dec_num_stations(arvif, sta);
ret = -ENOMEM;
goto exit;
}