From d75ebe23d80c213cd45bcb1cd93dfbfca8e47ba6 Mon Sep 17 00:00:00 2001 From: Ilan Peer Date: Mon, 22 May 2023 22:33:52 +0300 Subject: [PATCH] AP: Handle Management frame TX status for AP MLD address This allows proper TX status handling when MLD addressing is used for Management frames. Note, that the statuses are still not forwarded to the correct link BSS. This will be handled in later commits. Signed-off-by: Ilan Peer --- src/ap/drv_callbacks.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c index 0cd8ce744..7d15ceaab 100644 --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c @@ -1538,12 +1538,22 @@ 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->iface, get_hdr_bssid(hdr, len)); - if (!hapd) + tmp_hapd = get_hapd_bssid(hapd->iface, get_hdr_bssid(hdr, len)); + if (tmp_hapd) { + hapd = tmp_hapd; +#ifdef CONFIG_IEEE80211BE + } else if (hapd->conf->mld_ap && + os_memcmp(hapd->mld_addr, get_hdr_bssid(hdr, len), + ETH_ALEN) == 0) { + /* AP MLD address match - use hapd pointer as-is */ +#endif /* CONFIG_IEEE80211BE */ + } else { return; + } + if (hapd == HAPD_BROADCAST) { if (stype != WLAN_FC_STYPE_ACTION || len <= 25 || buf[24] != WLAN_ACTION_PUBLIC) -- 2.47.3