[PATCH v2 05/22] hostapd: MLO: handle auth/assoc on link address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Sriram R <quic_srirrama@xxxxxxxxxxx>

Currently in function mlme_event_mgmt_tx_status(), link_id will be only
filled if the frame was the last transmitted on the whole drv (driver)
level. With co-hosted MLDs, there could be cases where multiple packets
are sent out by various interfaces (BSS) under the same drv. Now while
handling the Tx status, only one interface will get the proper link_id.
Rest all will get -1, and event will be routed to first BSS always. If the
packet was not sent from first BSS then this leads to possibility of packet
getting dropped.

Hence in order to make the underlying link identification easier, modify
authentication and association frames to be always sent with link address
as A1 and A3 for ease of Tx status handling.

Signed-off-by: Sriram R <quic_srirrama@xxxxxxxxxxx>
Signed-off-by: Aditya Kumar Singh <quic_adisi@xxxxxxxxxxx>
---
v2: Rephrased commit message a bit to describe why changes is required

---
 src/ap/ieee802_11.c | 25 ++-----------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 85a39d5ffb0e..b045dc6f7cb0 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -416,14 +416,7 @@ static int send_auth_reply(struct hostapd_data *hapd, struct sta_info *sta,
 	struct wpabuf *ml_resp = NULL;
 
 #ifdef CONFIG_IEEE80211BE
-	/*
-	 * Once a non-AP MLD is added to the driver, the addressing should use
-	 * the MLD MAC address. Thus, use the MLD address instead of translating
-	 * the addresses.
-	 */
 	if (ap_sta_is_mld(hapd, sta)) {
-		sa = hapd->mld->mld_addr;
-
 		ml_resp = hostapd_ml_auth_resp(hapd);
 		if (!ml_resp)
 			return -1;
@@ -444,7 +437,7 @@ static int send_auth_reply(struct hostapd_data *hapd, struct sta_info *sta,
 					    WLAN_FC_STYPE_AUTH);
 	os_memcpy(reply->da, dst, ETH_ALEN);
 	os_memcpy(reply->sa, sa, ETH_ALEN);
-	os_memcpy(reply->bssid, bssid, ETH_ALEN);
+	os_memcpy(reply->bssid, sa, ETH_ALEN);
 
 	reply->u.auth.auth_alg = host_to_le16(auth_alg);
 	reply->u.auth.auth_transaction = host_to_le16(auth_transaction);
@@ -3265,14 +3258,9 @@ static void handle_auth(struct hostapd_data *hapd,
 	bssid = mgmt->bssid;
 
 #ifdef CONFIG_IEEE80211BE
-	 /*
-	  * Once a non-AP MLD is added to the driver, the addressing should use
-	  * the MLD MAC address. It is the responsibility of the driver to
-	  * handle the translations.
-	  */
 	if (ap_sta_is_mld(hapd, sta)) {
 		dst = sta->addr;
-		bssid = hapd->mld->mld_addr;
+		bssid = hapd->own_addr;
 	}
 #endif /* CONFIG_IEEE80211BE */
 
@@ -4823,15 +4811,6 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
 			     (reassoc ? WLAN_FC_STYPE_REASSOC_RESP :
 			      WLAN_FC_STYPE_ASSOC_RESP));
 
-#ifdef CONFIG_IEEE80211BE
-	/*
-	 * Once a non-AP MLD is added to the driver, the addressing should use
-	 * MLD MAC address.
-	 */
-	if (ap_sta_is_mld(hapd, sta) && allow_mld_addr_trans)
-		sa = hapd->mld->mld_addr;
-#endif /* CONFIG_IEEE80211BE */
-
 	os_memcpy(reply->da, addr, ETH_ALEN);
 	os_memcpy(reply->sa, sa, ETH_ALEN);
 	os_memcpy(reply->bssid, sa, ETH_ALEN);
-- 
2.25.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux