summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2020-12-14 19:21:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-22 11:41:17 +0200
commit5d97f20dc21f3f4b14105590f729e513b0c4921d (patch)
treeef5376df7b2649d09a4d9cff856b985225b602d8 /drivers/net
parent4d6b4335838fd89419212e1e486c415ec36fb610 (diff)
ath9k: Clear key cache explicitly on disabling hardware
commit 73488cb2fa3bb1ef9f6cf0d757f76958bd4deaca upstream. Now that ath/key.c may not be explicitly clearing keys from the key cache, clear all key cache entries when disabling hardware to make sure no keys are left behind beyond this point. Signed-off-by: Jouni Malinen <jouni@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20201214172118.18100-3-jouni@codeaurora.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index f09168a885a5..b9b1c468850d 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -890,6 +890,11 @@ static void ath9k_stop(struct ieee80211_hw *hw)
spin_unlock_bh(&sc->sc_pcu_lock);
+ /* Clear key cache entries explicitly to get rid of any potentially
+ * remaining keys.
+ */
+ ath9k_cmn_init_crypto(sc->sc_ah);
+
ath9k_ps_restore(sc);
sc->ps_idle = prev_idle;