<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From 7a280162d745bb871080295bbb9d4531d08a0a00 Mon Sep 17 00:00:00 2001
From: Ilan Peer &lt;ilan.peer@intel.com&gt;
Date: Mon, 22 May 2023 22:33:52 +0300
Subject: [PATCH 24/54] AP: Handle TX status for MLD AP

This allows proper TX status handling when MLD addressing is used.
Note, that the statuses are still not forwarded to the correct link BSS.
This will be handled in later patches.

Signed-off-by: Ilan Peer &lt;ilan.peer@intel.com&gt;
---
 src/ap/drv_callbacks.c | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index 236a83f75..0281264a6 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -1538,12 +1538,26 @@ static void hostapd_mgmt_tx_cb(struct hostapd_data *hapd, const u8 *buf,
 			       size_t len, u16 stype, int ok)
 {
 	struct ieee80211_hdr *hdr;
-	struct hostapd_data *orig_hapd = hapd;
+	struct hostapd_data *orig_hapd = hapd, *tmp_hapd;
 
 	hdr = (struct ieee80211_hdr *) buf;
-	hapd = get_hapd_bssid(hapd-&gt;iface, get_hdr_bssid(hdr, len));
-	if (!hapd)
-		return;
+	tmp_hapd = get_hapd_bssid(hapd-&gt;iface, get_hdr_bssid(hdr, len));
+	if (tmp_hapd) {
+		hapd = tmp_hapd;
+	} else {
+		bool mld_ap_match = false;
+
+#ifdef CONFIG_IEEE80211BE
+		mld_ap_match = (hapd-&gt;conf-&gt;mld_ap &amp;&amp;
+				!os_memcmp(hapd-&gt;mld_addr,
+					   get_hdr_bssid(hdr, len),
+					   ETH_ALEN));
+#endif /* CONFIG_IEEE80211BE */
+
+		if (!mld_ap_match)
+			return;
+	}
+
 	if (hapd == HAPD_BROADCAST) {
 		if (stype != WLAN_FC_STYPE_ACTION || len &lt;= 25 ||
 		    buf[24] != WLAN_ACTION_PUBLIC)
-- 
2.39.2

</pre></body></html>