Skip to content

Commit d7145a7

Browse files
committed
wifi: mac80211: don't mark keys for inactive links as uploaded
JIRA: https://issues.redhat.com/browse/RHEL-114889 commit 63df395 Author: Miri Korenblit <miriam.rachel.korenblit@intel.com> Date: Wed Jul 9 23:38:00 2025 +0300 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 <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250709233537.655094412b0b.Iacae31af3ba2a705da0a9baea976c2f799d65dc4@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
1 parent 4047b3f commit d7145a7

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)