History

cfg80211: Authentication offload to user space in AP mode

commit 40cbfa90218b ("cfg80211/nl80211: Optional authentication offload to userspace")' introduced authentication offload to user space by the host drivers in station mode. This commit extends the same for the AP mode too. Extend NL80211_ATTR_EXTERNAL_AUTH_SUPPORT to also claim the support of external authentication from the user space in AP mode. A new flag parameter is introduced in cfg80211_ap_settings to intend the same while "start ap". Host driver to use NL80211_CMD_FRAME interface to transmit and receive the authentication frames to / from the user space. Host driver to indicate the flag NL80211_RXMGMT_FLAG_EXTERNAL_AUTH while sending the authentication frame to the user space. This intends to the user space that the driver wishes it to process the authentication frame for certain protocols, though it had initially advertised the support for SME functionality. User space shall accordingly do the authentication and indicate its final status through the command NL80211_CMD_EXTERNAL_AUTH. Allow the command even if userspace doesn't include the attribute NL80211_ATTR_SSID for AP interface. Host driver shall continue with the association sequence and indicate the STA connection status through cfg80211_new_sta. To facilitate the host drivers in AP mode for matching the pmkid by the stations during the association, NL80211_CMD_EXTERNAL_AUTH is also enhanced to include the pmkid to drivers after the authentication. This pmkid can also be used in the STA mode to include in the association request. Also modify nl80211_external_auth to not mandate SSID in AP mode.

Srinivas Dasari committed 7 years ago

Commit fe494371 parent ab4dfa23 files · +42 −11Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+9−4
@@ -2266,10 +2266,10 @@ enum nl80211_commands { · 2265 unmodified lines
22662266 * &enum nl80211_external_auth_action value). This is used with the
22672267 * %NL80211_CMD_EXTERNAL_AUTH request event.
22682268 * @NL80211_ATTR_EXTERNAL_AUTH_SUPPORT: Flag attribute indicating that the user
2269− * space supports external authentication. This attribute shall be used
2270− * only with %NL80211_CMD_CONNECT request. The driver may offload
2271− * authentication processing to user space if this capability is indicated
2272− * in NL80211_CMD_CONNECT requests from the user space.
2269+ * space supports external authentication. This attribute shall be used
2270+ * with %NL80211_CMD_CONNECT and %NL80211_CMD_START_AP request. The driver
2271+ * may offload authentication processing to user space if this capability
2272+ * is indicated in the respective requests from the user space.
22732273 *
22742274 * @NL80211_ATTR_NSS: Station's New/updated RX_NSS value notified using this
22752275 * u8 attribute. This is used with %NL80211_CMD_STA_OPMODE_CHANGED.
@@ -5631,9 +5631,14 @@ enum nl80211_crit_proto_id { · 3355 unmodified lines
56315631 * Used by cfg80211_rx_mgmt()
56325632 *
56335633 * @NL80211_RXMGMT_FLAG_ANSWERED: frame was answered by device/driver.
5634+ * @NL80211_RXMGMT_FLAG_EXTERNAL_AUTH: Host driver intends to offload
5635+ * the authentication. Exclusively defined for host drivers that
5636+ * advertises the SME functionality but would like the userspace
5637+ * to handle certain authentication algorithms (e.g. SAE).
56345638 */
56355639 enum nl80211_rxmgmt_flags {
56365640 NL80211_RXMGMT_FLAG_ANSWERED = 1 << 0,
5641+ NL80211_RXMGMT_FLAG_EXTERNAL_AUTH = 1 << 1,
56375642 };
56385643
56395644 /*