diff options
| author | Felix Fietkau <nbd@nbd.name> | 2026-10-06 22:59:16 +0200 |
|---|---|---|
| committer | Felix Fietkau <nbd@nbd.name> | 2026-10-07 12:50:43 +0200 |
| commit | 2ec14ab42dfd195976bd834fecbcea00ae7da600 (patch) | |
| tree | f2638b5f21715178639f039a223bda4dac151d90 | |
| parent | 90abe74d274fad080dffaf3c671e5f31cee53a5b (diff) | |
wifi: mt76: mt7996: upload only the keys of the link being set up
mt7996_vif_link_add() and mt7996_vif_link_destroy() walk the vif keys
through mt7996_key_iter(), which passes every group key to
mt7996_set_hw_key() for the link being set up. On an MLD interface each
group key belongs to one link, as key->link_id says, so a new link gets
the GTK and BIGTK of the other links written to its group WTBL entry,
and its hw_key_idx set to their key index.
Skip keys that belong to a different link, as mt7996_set_key() already
does for keys that mac80211 installs.
Fixes: eddc7286f6bb ("wifi: mt76: mt7996: fix key add/remove imbalance")
Link: https://patch.msgid.link/20261006205936.669125-7-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
| -rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7996/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c index e5f74f23d469..e74254928578 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c @@ -291,6 +291,9 @@ mt7996_key_iter(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (sta) return; + if (key->link_id >= 0 && key->link_id != it->link_id) + return; + WARN_ON(mt7996_set_hw_key(hw, it->cmd, vif, NULL, it->link_id, key)); } |
