Commit aa566ac6 authored by Michael Lo's avatar Michael Lo Committed by Felix Fietkau
Browse files

wifi: mt76: mt7921: fix using incorrect group cipher after disconnection.



To avoid incorrect cipher after disconnection, we should
do the key deletion process in this case.

Fixes: e6db67fa ("wifi: mt76: ignore key disable commands")
Signed-off-by: default avatarMichael Lo <michael.lo@mediatek.com>
Signed-off-by: default avatarMing Yen Hsieh <mingyen.hsieh@mediatek.com>
Tested-by: default avatarDavid Ruth <druth@chromium.org>
Reviewed-by: default avatarDavid Ruth <druth@chromium.org>
Link: https://patch.msgid.link/20240801024335.12981-1-mingyen.hsieh@mediatek.com


Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent f1b1e133
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -531,6 +531,12 @@ static int mt7921_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
	} else {
		if (idx == *wcid_keyidx)
			*wcid_keyidx = -1;

		/* 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->type != NL80211_IFTYPE_STATION || vif->cfg.assoc)
			goto out;
	}