aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorAlexander Wetzel <alexander@wetzel-home.de>2019-04-24 19:32:46 +0200
committerJohannes Berg <johannes.berg@intel.com>2019-04-26 13:02:11 +0200
commit387bc002250b31cf8012b736e482c9f65cbf7dd5 (patch)
treef01554bb4fc22e7b042db87eee6570da3bc01aec /net/mac80211
parentmac80211_hwsim: Extended Key ID support (diff)
downloadlinux-dev-387bc002250b31cf8012b736e482c9f65cbf7dd5.tar.xz
linux-dev-387bc002250b31cf8012b736e482c9f65cbf7dd5.zip
mac80211: Set CAN_REPLACE_PTK0 for SW crypto only drivers
Mac80211 SW crypto handles replacing PTK keys correctly. Don't trigger needless warnings or workarounds when the driver can only use the known good SW crypto provided by mac80211. Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index e56650a9838e..2b608044ae23 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1060,6 +1060,13 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
wiphy_ext_feature_set(local->hw.wiphy,
NL80211_EXT_FEATURE_EXT_KEY_ID);
+ /* Mac80211 and therefore all cards only using SW crypto are able to
+ * handle PTK rekeys correctly
+ */
+ if (!local->ops->set_key)
+ wiphy_ext_feature_set(local->hw.wiphy,
+ NL80211_EXT_FEATURE_CAN_REPLACE_PTK0);
+
/*
* Calculate scan IE length -- we need this to alloc
* memory and to subtract from the driver limit. It