[3/7] driver_nl80211: check 4-way handshake offload support

Message ID 1517143537-7441-4-git-send-email-andrei.otcheretianski@intel.com
State Accepted
Headers show
Series
  • Add 4-way handshake offload support
Related show

Commit Message

Andrei Otcheretianski Jan. 28, 2018, 12:45 p.m.
From: Eliad Peller <eliad@wizery.com>

Set the WPA_DRIVER_FLAGS_4WAY_HANDSHAKE flag if the
driver indicates both 4-way handshake PSK and 1X support.
Currently wpa_supplicant doesn't distinguish between 4-way
handshake for 1x and PSK, but nl80211 API has different
capabilities for each one.

Change-Id: Ia8341819ed35f88460813537a8cf4c4ef46c8875
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
---
 src/drivers/driver_nl80211_capa.c | 6 ++++++
 1 file changed, 6 insertions(+)

Patch

diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
index f11a1d7..fd8b457 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -401,6 +401,12 @@  static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info,
 	if (ext_feature_isset(ext_features, len,
 			      NL80211_EXT_FEATURE_FILS_SK_OFFLOAD))
 		capa->flags |= WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD;
+
+	if (ext_feature_isset(ext_features, len,
+			      NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK) &&
+	    ext_feature_isset(ext_features, len,
+			      NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X))
+		capa->flags |= WPA_DRIVER_FLAGS_4WAY_HANDSHAKE;
 }