static void hostapd_mgmt_tx_cb(struct hostapd_data *hapd, const u8 *buf,
- size_t len, u16 stype, int ok)
+ size_t len, u16 stype, int ok, int link_id)
{
struct ieee80211_hdr *hdr;
- struct hostapd_data *orig_hapd = hapd, *tmp_hapd;
+ struct hostapd_data *orig_hapd, *tmp_hapd;
+
+#ifdef CONFIG_IEEE80211BE
+ if (hapd->conf->mld_ap && link_id != -1) {
+ tmp_hapd = hostapd_mld_get_link_bss(hapd, link_id);
+ if (tmp_hapd)
+ hapd = tmp_hapd;
+ }
+#endif /* CONFIG_IEEE80211BE */
+ orig_hapd = hapd;
hdr = (struct ieee80211_hdr *) buf;
tmp_hapd = get_hapd_bssid(hapd->iface, get_hdr_bssid(hdr, len));
hostapd_mgmt_tx_cb(hapd, data->tx_status.data,
data->tx_status.data_len,
data->tx_status.stype,
- data->tx_status.ack);
+ data->tx_status.ack,
+ data->tx_status.link_id);
break;
case WLAN_FC_TYPE_DATA:
hostapd_tx_status(hapd, data->tx_status.dst,
noack);
}
- if (noack || WLAN_FC_GET_TYPE(fc) != WLAN_FC_TYPE_MGMT ||
- WLAN_FC_GET_STYPE(fc) != WLAN_FC_STYPE_ACTION)
+ if ((noack || WLAN_FC_GET_TYPE(fc) != WLAN_FC_TYPE_MGMT ||
+ WLAN_FC_GET_STYPE(fc) != WLAN_FC_STYPE_ACTION) &&
+ link_id == NL80211_DRV_LINK_ID_NA)
use_cookie = 0;
send_frame_cmd:
#ifdef CONFIG_TESTING_OPTIONS
res = nl80211_send_frame_cmd(bss, freq, wait_time, data, data_len,
use_cookie, no_cck, noack, offchanok,
csa_offs, csa_offs_len);
+ if (!res)
+ drv->send_frame_link_id = link_id;
return res;
}
u64 vendor_scan_cookie;
u64 remain_on_chan_cookie;
u64 send_frame_cookie;
+ int send_frame_link_id;
#define MAX_SEND_FRAME_COOKIES 20
u64 send_frame_cookies[MAX_SEND_FRAME_COOKIES];
unsigned int num_send_frame_cookies;
event.tx_status.data = frame;
event.tx_status.data_len = len;
event.tx_status.ack = ack != NULL;
+ event.tx_status.link_id = cookie_val == drv->send_frame_cookie ?
+ drv->send_frame_link_id : NL80211_DRV_LINK_ID_NA;
wpa_supplicant_event(drv->ctx, EVENT_TX_STATUS, &event);
}