diff options
author | Felix Fietkau <nbd@nbd.name> | 2023-03-30 11:12:59 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2023-04-03 15:50:20 +0200 |
commit | e6db67fa871dee37d22701daba806bfcd4d9df49 (patch) | |
tree | 31c6c4f623e1584c3d9c2cc02179fef9f346817a /drivers/net/wireless/mediatek/mt76/mt7915 | |
parent | wifi: ath11k: reduce the MHI timeout to 20s (diff) | |
download | linux-e6db67fa871dee37d22701daba806bfcd4d9df49.tar.xz linux-e6db67fa871dee37d22701daba806bfcd4d9df49.zip |
wifi: mt76: ignore key disable commands
This helps avoid cleartext leakage of already queued or powersave buffered
packets, when a reassoc triggers the key deletion.
Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230330091259.61378-1-nbd@nbd.name
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7915')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7915/main.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c index 3bbccbdfc5eb..784191ec4802 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c @@ -410,16 +410,15 @@ static int mt7915_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, mt7915_mcu_add_bss_info(phy, vif, true); } - if (cmd == SET_KEY) + if (cmd == SET_KEY) { *wcid_keyidx = idx; - else if (idx == *wcid_keyidx) - *wcid_keyidx = -1; - else + } else { + if (idx == *wcid_keyidx) + *wcid_keyidx = -1; goto out; + } - mt76_wcid_key_setup(&dev->mt76, wcid, - cmd == SET_KEY ? key : NULL); - + mt76_wcid_key_setup(&dev->mt76, wcid, key); err = mt76_connac_mcu_add_key(&dev->mt76, vif, &msta->bip, key, MCU_EXT_CMD(STA_REC_UPDATE), &msta->wcid, cmd); |