lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 11 Nov 2014 06:27:03 +0000
From:	"Gautam (Gautam Kumar) Shukla" <gautams@...adcom.com>
To:	"linville@...driver.com" <linville@...driver.com>
CC:	"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
	"johannes@...solutions.net" <johannes@...solutions.net>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Jithu Jance <jithu@...adcom.com>,
	Sreenath S <sreenats@...adcom.com>
Subject: [PATCH 2/2] linux-wireless:Added wiphy capability flag for
 offloading 4way handshake to driver


For offloading 4 way handshake to driver , currently we don't have WIPHY capability flag to communicate same to supplicant.
I have added the flag NL80211_ATTR_4WAY_KEY_HANDSHAKE  and rest of the code for the same.

Tested on x86 linux machine

Signed-off-by: Gautam kumar shukla <gautams@...adcom.com>
---
 include/net/cfg80211.h       | 4 ++++
 include/uapi/linux/nl80211.h | 5 ++++-
 net/wireless/nl80211.c       | 4 ++++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 6f744e0..b37de0a 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2629,7 +2629,10 @@ struct cfg80211_ops {
  *	TSPEC sessions (TID aka TSID 0-7) with the NL80211_CMD_ADD_TX_TS
  *	command. Standard IEEE 802.11 TSPEC setup is not yet supported, it
  *	needs to be able to handle Block-Ack agreements and other things.
+ *	@WIPHY_FLAG_SUPPORTS_4WAY_HANDHSHAKE:the device supports 4way handshake
+ *	in the driver/firmware.
  */
+
 enum wiphy_flags {
 	WIPHY_FLAG_SUPPORTS_WMM_ADMISSION	= BIT(0),
 	/* use hole at 1 */
@@ -2654,6 +2657,7 @@ enum wiphy_flags {
 	WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL	= BIT(21),
 	WIPHY_FLAG_SUPPORTS_5_10_MHZ		= BIT(22),
 	WIPHY_FLAG_HAS_CHANNEL_SWITCH		= BIT(23),
+	WIPHY_FLAG_SUPPORTS_4WAY_HANDSHAKE	= BIT(24),
 };
 
 /**
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index b01d5dd..2c474a3 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -1640,9 +1640,11 @@ enum nl80211_commands {
  *
  *	@NL80211_ATTR_PSK: a PSK value (u8 attribute).This is 32-octet (256-bit)
  *	PSK.
+ * @NL80211_ATTR_4WAY_KEY_HANDSHAKE: Indicates whether the driver is capable
+ * of 4way key handshake
  *
  *
- * @NL80211_ATTR_MAX: highest attribute number currently defined
+ * * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
  */
 enum nl80211_attrs {
@@ -1995,6 +1997,7 @@ enum nl80211_attrs {
 	NL80211_ATTR_SMPS_MODE,
 
 	NL80211_ATTR_PSK,
+	NL80211_ATTR_4WAY_KEY_HANDSHAKE,
 
 	/* add attributes here, update the policy in nl80211.c */
 
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 91c24b1..5f85c41 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -396,6 +396,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
 	[NL80211_ATTR_ADMITTED_TIME] = { .type = NLA_U16 },
 	[NL80211_ATTR_SMPS_MODE] = { .type = NLA_U8 },
 	[NL80211_ATTR_PSK] = { .type = NLA_BINARY, .len = 32 },
+	[NL80211_ATTR_4WAY_KEY_HANDSHAKE] = { .type = NLA_FLAG },
 };
 
 /* policy for the key attributes */
@@ -1303,6 +1304,9 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
 		if ((rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_FW_ROAM) &&
 		    nla_put_flag(msg, NL80211_ATTR_ROAM_SUPPORT))
 			goto nla_put_failure;
+		if ((rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_4WAY_HANDSHAKE) &&
+			nla_put_flag(msg,NL80211_ATTR_4WAY_KEY_HANDSHAKE))
+			goto nla_put_failure;
 		if ((rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) &&
 		    nla_put_flag(msg, NL80211_ATTR_TDLS_SUPPORT))
 			goto nla_put_failure;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ