Message ID | 20240801024335.12981-1-mingyen.hsieh@mediatek.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | wifi: mt76: mt7921: fix using incorrect group cipher after disconnection. | expand |
Tested-by: David Ruth <druth@chromium.org> Reviewed-by: David Ruth <druth@chromium.org>
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c index 2e6268cb06c0..4f4577b7e544 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c @@ -537,7 +537,13 @@ static int mt7921_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, } else { if (idx == *wcid_keyidx) *wcid_keyidx = -1; - goto out; + + /* For security issue we don't trigger the key deletion when + * reassociating. But we should trigger the deletion process + * to avoid using incorrect cipher after disconnection, + */ + if (vif->cfg.assoc) + goto out; } mt76_wcid_key_setup(&dev->mt76, wcid, key);