linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
To: linux-wireless@vger.kernel.org, Johannes Berg <johannes.berg@intel.com>
Cc: brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com,
	Arend van Spriel <arend.vanspriel@broadcom.com>,
	Franky Lin <franky.lin@broadcom.com>,
	Hante Meuleman <hante.meuleman@broadcom.com>,
	Wright Feng <wright.feng@cypress.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	Chung-Hsien Hsu <stanley.hsu@cypress.com>,
	Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Subject: [PATCH 3/4] nl80211: support SAE authentication offload in AP mode
Date: Tue, 23 Jun 2020 08:49:37 -0500	[thread overview]
Message-ID: <20200623134938.39997-4-chi-hsien.lin@cypress.com> (raw)
In-Reply-To: <20200623134938.39997-1-chi-hsien.lin@cypress.com>

From: Chung-Hsien Hsu <stanley.hsu@cypress.com>

Add support for SAE authentication offload in AP mode.

Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
---
 include/uapi/linux/nl80211.h | 10 ++++++----
 net/wireless/nl80211.c       |  5 +++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index f5bb69664b32..a340d88ee8a6 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -252,9 +252,10 @@
  * DOC: SAE authentication offload
  *
  * By setting @NL80211_EXT_FEATURE_SAE_OFFLOAD flag drivers can indicate they
- * support offloading SAE authentication for WPA3-Personal networks. In
- * %NL80211_CMD_CONNECT the password for SAE should be specified using
- * %NL80211_ATTR_SAE_PASSWORD.
+ * support offloading SAE authentication for WPA3-Personal networks. The
+ * password for SAE should be specified using %NL80211_ATTR_SAE_PASSWORD in
+ * %NL80211_CMD_CONNECT and %NL80211_CMD_START_AP for station and AP mode
+ * respectively.
  */
 
 /**
@@ -5736,7 +5737,8 @@ enum nl80211_feature_flags {
  *	to a station.
  *
  * @NL80211_EXT_FEATURE_SAE_OFFLOAD: Device wants to do SAE authentication in
- *	station mode (SAE password is passed as part of the connect command).
+ *	station mode (SAE password is passed as part of the connect command)
+ *	or AP mode (SAE password is passed as part of the start AP command).
  *
  * @NL80211_EXT_FEATURE_VLAN_OFFLOAD: The driver supports a single netdev
  *	with VLAN tagged frames and separate VLAN-specific netdevs added using
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 004c79338f31..bc4f066cf955 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4813,8 +4813,9 @@ static bool nl80211_valid_auth_type(struct cfg80211_registered_device *rdev,
 			return false;
 		return true;
 	case NL80211_CMD_START_AP:
-		/* SAE not supported yet */
-		if (auth_type == NL80211_AUTHTYPE_SAE)
+		if (!wiphy_ext_feature_isset(&rdev->wiphy,
+					     NL80211_EXT_FEATURE_SAE_OFFLOAD) &&
+		    auth_type == NL80211_AUTHTYPE_SAE)
 			return false;
 		/* FILS not supported yet */
 		if (auth_type == NL80211_AUTHTYPE_FILS_SK ||
-- 
2.25.0


  parent reply	other threads:[~2020-06-23 13:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23 13:49 [PATCH 0/4] nl80211: add support for WPA/WPA2-PSK 4-way handshake and SAE offload in AP mode Chi-Hsien Lin
2020-06-23 13:49 ` [PATCH 1/4] nl80211: support 4-way handshake offloading for WPA/WPA2-PSK " Chi-Hsien Lin
2020-07-30 14:52   ` Johannes Berg
2020-06-23 13:49 ` [PATCH 2/4] brcmfmac: " Chi-Hsien Lin
2020-06-23 13:49 ` Chi-Hsien Lin [this message]
2020-07-30 14:55   ` [PATCH 3/4] nl80211: support SAE authentication offload " Johannes Berg
2020-06-23 13:49 ` [PATCH 4/4] brcmfmac: " Chi-Hsien Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200623134938.39997-4-chi-hsien.lin@cypress.com \
    --to=chi-hsien.lin@cypress.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=brcm80211-dev-list@cypress.com \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=johannes.berg@intel.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stanley.hsu@cypress.com \
    --cc=wright.feng@cypress.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).