Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: Set CAN_REPLACE_PTK0 for SW crypto only drivers
@ 2019-04-24 17:32 Alexander Wetzel
  2019-04-24 18:55 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Wetzel @ 2019-04-24 17:32 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Alexander Wetzel

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>
---
 net/mac80211/main.c | 7 +++++++
 1 file changed, 7 insertions(+)

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
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-24 21:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-24 17:32 [PATCH] mac80211: Set CAN_REPLACE_PTK0 for SW crypto only drivers Alexander Wetzel
2019-04-24 18:55 ` Johannes Berg
2019-04-24 20:58   ` Alexander Wetzel
2019-04-24 21:01     ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox