Commit f52a0b40 authored by Yedidya Benshimol's avatar Yedidya Benshimol Committed by Johannes Berg

wifi: mac80211: mark keys as uploaded when added by the driver

When the driver has some form of GTK rekeying offload, e.g. during
WoWLAN, mac80211 can assume that keys that the driver adds for
that are already present in the hardware acceleration. Mark them
accordingly.
Signed-off-by: default avatarYedidya Benshimol <yedidya.ben.shimol@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230621144414.bc78c7ff2a3d.I5e313d69e2b6a7a4766ef82d0faa122dd4c1c46d@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent fd006d60
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net> * Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net>
* Copyright 2013-2014 Intel Mobile Communications GmbH * Copyright 2013-2014 Intel Mobile Communications GmbH
* Copyright 2015-2017 Intel Deutschland GmbH * Copyright 2015-2017 Intel Deutschland GmbH
* Copyright 2018-2020, 2022 Intel Corporation * Copyright 2018-2020, 2022-2023 Intel Corporation
*/ */
#include <linux/if_ether.h> #include <linux/if_ether.h>
...@@ -510,8 +510,12 @@ static int ieee80211_key_replace(struct ieee80211_sub_if_data *sdata, ...@@ -510,8 +510,12 @@ static int ieee80211_key_replace(struct ieee80211_sub_if_data *sdata,
ret = ieee80211_key_enable_hw_accel(new); ret = ieee80211_key_enable_hw_accel(new);
} }
} else { } else {
if (!new->local->wowlan) if (!new->local->wowlan) {
ret = ieee80211_key_enable_hw_accel(new); ret = ieee80211_key_enable_hw_accel(new);
} else {
assert_key_lock(new->local);
new->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE;
}
} }
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment