Skip to content

Commit 63df395

Browse files
Miriam-Racheljmberg-intel
authored andcommitted
wifi: mac80211: don't mark keys for inactive links as uploaded
During resume, the driver can call ieee80211_add_gtk_rekey for keys that are not programmed into the device, e.g. keys of inactive links. Don't mark such a key as uploaded to avoid removing it later from the driver/device. Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250709233537.655094412b0b.Iacae31af3ba2a705da0a9baea976c2f799d65dc4@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 44ff9da commit 63df395

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/mac80211/key.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,8 @@ static int ieee80211_key_replace(struct ieee80211_sub_if_data *sdata,
510510
} else {
511511
if (!new->local->wowlan)
512512
ret = ieee80211_key_enable_hw_accel(new);
513-
else
513+
else if (link_id < 0 || !sdata->vif.active_links ||
514+
BIT(link_id) & sdata->vif.active_links)
514515
new->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE;
515516
}
516517

0 commit comments

Comments
 (0)