2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 16:53:54 +08:00

wifi: cfg80211: Authentication offload to user space for MLO connection in STA mode

Currently authentication request event interface doesn't have support to
indicate the user space whether it should enable MLO or not during the
authentication with the specified AP. But driver needs such capability
since the connection is MLO or not decided by the driver in case of SME
offload to the driver.

Add support for driver to indicate MLD address of the AP in
authentication offload request to inform user space to enable MLO during
authentication process. Driver shall look at NL80211_ATTR_MLO_SUPPORT
flag capability in NL80211_CMD_CONNECT to know whether the user space
supports enabling MLO during the authentication offload.

User space should enable MLO during the authentication only when it
receives the AP MLD address in authentication offload request. User
space shouldn't enable MLO if the authentication offload request doesn't
indicate the AP MLD address even if the AP is MLO capable.

When MLO is enabled, user space should use the MAC address of the
interface (on which driver sent request) as self MLD address. User space
and driver to use MLD addresses in RA, TA and BSSID fields of the frames
between them, and driver translates the MLD addresses to/from link
addresses based on the link chosen for the authentication.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Link: https://lore.kernel.org/r/20230116125058.1604843-1-quic_vjakkam@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Veerendranath Jakkam 2023-01-16 18:20:58 +05:30 committed by Johannes Berg
parent 3d9c361713
commit 9a47c1ef5a
4 changed files with 37 additions and 3 deletions

View File

@ -3600,6 +3600,17 @@ struct cfg80211_pmk_conf {
* the real status code for failures. Used only for the authentication
* response command interface (user space to driver).
* @pmkid: The identifier to refer a PMKSA.
* @mld_addr: MLD address of the peer. Used by the authentication request event
* interface. Driver indicates this to enable MLO during the authentication
* offload to user space. Driver shall look at %NL80211_ATTR_MLO_SUPPORT
* flag capability in NL80211_CMD_CONNECT to know whether the user space
* supports enabling MLO during the authentication offload.
* User space should use the address of the interface (on which the
* authentication request event reported) as self MLD address. User space
* and driver should use MLD addresses in RA, TA and BSSID fields of
* authentication frames sent or received via cfg80211. The driver
* translates the MLD addresses to/from link addresses based on the link
* chosen for the authentication.
*/
struct cfg80211_external_auth_params {
enum nl80211_external_auth_action action;
@ -3608,6 +3619,7 @@ struct cfg80211_external_auth_params {
unsigned int key_mgmt_suite;
u16 status;
const u8 *pmkid;
u8 mld_addr[ETH_ALEN] __aligned(2);
};
/**

View File

@ -1167,6 +1167,23 @@
* %NL80211_ATTR_STATUS_CODE attribute in %NL80211_CMD_EXTERNAL_AUTH
* command interface.
*
* Host driver sends MLD address of the AP with %NL80211_ATTR_MLD_ADDR in
* %NL80211_CMD_EXTERNAL_AUTH event to indicate user space to enable MLO
* during the authentication offload in STA mode while connecting to MLD
* APs. Host driver should check %NL80211_ATTR_MLO_SUPPORT flag capability
* in %NL80211_CMD_CONNECT to know whether the user space supports enabling
* MLO during the authentication offload or not.
* User space should enable MLO during the authentication only when it
* receives the AP MLD address in authentication offload request. User
* space shouldn't enable MLO when the authentication offload request
* doesn't indicate the AP MLD address even if the AP is MLO capable.
* User space should use %NL80211_ATTR_MLD_ADDR as peer's MLD address and
* interface address identified by %NL80211_ATTR_IFINDEX as self MLD
* address. User space and host driver to use MLD addresses in RA, TA and
* BSSID fields of the frames between them, and host driver translates the
* MLD addresses to/from link addresses based on the link chosen for the
* authentication.
*
* Host driver reports this status on an authentication failure to the
* user space through the connect result as the user space would have
* initiated the connection through the connect request.

View File

@ -19720,7 +19720,9 @@ int cfg80211_external_auth_request(struct net_device *dev,
params->action) ||
nla_put(msg, NL80211_ATTR_BSSID, ETH_ALEN, params->bssid) ||
nla_put(msg, NL80211_ATTR_SSID, params->ssid.ssid_len,
params->ssid.ssid))
params->ssid.ssid) ||
(!is_zero_ether_addr(params->mld_addr) &&
nla_put(msg, NL80211_ATTR_MLD_ADDR, ETH_ALEN, params->mld_addr)))
goto nla_put_failure;
genlmsg_end(msg, hdr);

View File

@ -2524,6 +2524,7 @@ TRACE_EVENT(rdev_external_auth,
MAC_ENTRY(bssid)
__array(u8, ssid, IEEE80211_MAX_SSID_LEN + 1)
__field(u16, status)
MAC_ENTRY(mld_addr)
),
TP_fast_assign(WIPHY_ASSIGN;
NETDEV_ASSIGN;
@ -2532,10 +2533,12 @@ TRACE_EVENT(rdev_external_auth,
memcpy(__entry->ssid, params->ssid.ssid,
params->ssid.ssid_len);
__entry->status = params->status;
MAC_ASSIGN(mld_addr, params->mld_addr);
),
TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: %pM"
", ssid: %s, status: %u", WIPHY_PR_ARG, NETDEV_PR_ARG,
__entry->bssid, __entry->ssid, __entry->status)
", ssid: %s, status: %u, mld_addr: %pM",
WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->bssid,
__entry->ssid, __entry->status, __entry->mld_addr)
);
TRACE_EVENT(rdev_start_radar_detection,