From: Ilan Peer Date: Mon, 22 May 2023 19:33:52 +0000 (+0300) Subject: AP: Handle Management frame TX status for AP MLD address X-Git-Tag: hostap_2_11~1130 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d75ebe23d80c213cd45bcb1cd93dfbfca8e47ba6;p=thirdparty%2Fhostap.git 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 --- 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)