In station mode a hardware group key is installed in the key cache slot matching its key index (1-3). ath_key_delete() returns early for slots below IEEE80211_WEP_NKID, so their keymap bits are never cleared and stay set after the key is gone. ath9k_cmn_rx_skb_postprocess() marks a protected frame without a hardware key match as RX_FLAG_DECRYPTED when the keymap bit of the key ID in its IV is set. After any earlier network with a hardware group key, a later network whose group key is done in software (GCMP, GCMP-256, CCMP-256) then has all group-addressed data frames handed to mac80211 as already decrypted. They are dropped, so the station never answers ARP requests or other broadcasts from the AP side while unicast keeps working. The early return dates from when ath_init() marked slots 0-3 as permanently in use. That was removed, but the early return was kept, so the bits of these slots now stay set once a key has used them. Before mac80211 gained software GCMP, GCMP-256 and CCMP-256, a later group key normally went back into the same hardware slot, which hid the problem. Seen on an AR9550 (Archer C7 v2, OpenWrt 25.12.6, backports 6.18.55) as a station: wpa2-gcmp works on a freshly loaded driver, fails with 100% loss of AP-originated pings after one wpa2-ccmp association and recovers only after a module reload. With this change the sequence GCMP, CCMP, GCMP, CCMP/TKIP-group, CCMP-256, CCMP with GTK rekeys, GCMP-256 with BIP-GMAC-256 passes. The slots below IEEE80211_WEP_NKID are never handed out by ath_reserve_key_cache_slot(), so clearing their bits cannot free them for another key. Fixes: be2864cfff2f ("ath9k: Fixed RX decryption status reporting") Signed-off-by: Rosen Penev --- drivers/net/wireless/ath/key.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/wireless/ath/key.c b/drivers/net/wireless/ath/key.c index 0ae436bd9b66..0df26af987b7 100644 --- a/drivers/net/wireless/ath/key.c +++ b/drivers/net/wireless/ath/key.c @@ -593,8 +593,6 @@ void ath_key_delete(struct ath_common *common, u8 hw_key_idx) ath_hw_keysetmac(common, hw_key_idx, NULL); else ath_hw_keyreset(common, hw_key_idx); - if (hw_key_idx < IEEE80211_WEP_NKID) - return; clear_bit(hw_key_idx, common->keymap); clear_bit(hw_key_idx, common->ccmp_keymap); -- 2.56.1