@@ -3604,6 +3604,14 @@ 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.
+ * @tx_addr: Driver shall fill this parameter to indicate userpsace to enable
+ * MLO and use tx_addr as TA of the authentication frames. Also, Drivers
+ * which may use transmit address different from interface address must
+ * indicate %NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA since the
+ * external authentication request may get triggered before association and
+ * cfg80211 won't have link address information by that time. If transmit
+ * address not indicated by driver userspace must do legacy authentication.
+ * This parameter valid only for the authentication request event.
*/
struct cfg80211_external_auth_params {
enum nl80211_external_auth_action action;
@@ -3612,6 +3620,7 @@ struct cfg80211_external_auth_params {
unsigned int key_mgmt_suite;
u16 status;
const u8 *pmkid;
+ u8 tx_addr[ETH_ALEN] __aligned(2);
};
/**
@@ -566,5 +566,6 @@ void cfg80211_remove_link(struct wireless_dev *wdev, unsigned int link_id);
void cfg80211_remove_links(struct wireless_dev *wdev);
int cfg80211_remove_virtual_intf(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev);
+bool cfg80211_allowed_address(struct wireless_dev *wdev, const u8 *addr);
#endif /* __NET_WIRELESS_CORE_H */
@@ -657,7 +657,7 @@ void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev)
cfg80211_mgmt_registrations_update(wdev);
}
-static bool cfg80211_allowed_address(struct wireless_dev *wdev, const u8 *addr)
+bool cfg80211_allowed_address(struct wireless_dev *wdev, const u8 *addr)
{
int i;
@@ -19703,6 +19703,16 @@ int cfg80211_external_auth_request(struct net_device *dev,
params->ssid.ssid))
goto nla_put_failure;
+ if (!is_zero_ether_addr(params->tx_addr)) {
+ if (!cfg80211_allowed_address(wdev, params->tx_addr) &&
+ !wiphy_ext_feature_isset(&rdev->wiphy,
+ NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA))
+ return -EINVAL;
+
+ if (nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, params->tx_addr))
+ goto nla_put_failure;
+ }
+
genlmsg_end(msg, hdr);
genlmsg_unicast(wiphy_net(&rdev->wiphy), msg,
wdev->conn_owner_nlportid);
Currently, there is no support for drivers to indicate external authentication request is for MLO or non-MLO connection. This information needed for userspace to consider MLO specific changes during authentication like adding Multi-Link IE with MLD address in authentication frames. Also, the transmit address of the authentication frames can be different from the interface address for MLO connection. Add transmit address parameter in external authentication request to indicate userspace to enable MLO and use the transmit address as TA in the authentication frames. If transmit address not indicated by driver userspace must do legacy authentication. Also, If the driver is using transmit address different from interface address it should advertise NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA flag. This is needed since the external authentication request may get triggered before association and cfg80211 won't have link address information by that time. Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com> --- include/net/cfg80211.h | 9 +++++++++ net/wireless/core.h | 1 + net/wireless/mlme.c | 2 +- net/wireless/nl80211.c | 10 ++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-)