Skip to content

Commit

Permalink
nl80211: support SAE authentication offload in AP mode
Browse files Browse the repository at this point in the history
Add support for SAE authentication offload in AP mode.

Signed-off-by: Chung-Hsien Hsu <[email protected]>
Signed-off-by: Chi-Hsien Lin <[email protected]>
  • Loading branch information
Chung-Hsien Hsu authored and RobertCNelson committed Mar 8, 2022
1 parent 5962312 commit b218f54
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 6 additions & 4 deletions include/uapi/linux/nl80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,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.
*/

/**
Expand Down Expand Up @@ -5318,7 +5319,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_4WAY_HANDSHAKE_AP_PSK: Device wants to do 4-way
* handshake with PSK in AP mode (PSK is passed as part of the start AP
Expand Down
5 changes: 3 additions & 2 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -4202,8 +4202,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 ||
Expand Down

0 comments on commit b218f54

Please sign in to comment.