diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c index c7e43d9d4..fa6e0d761 100644 --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c @@ -1090,6 +1090,20 @@ legacy: void hostapd_event_sta_low_ack(struct hostapd_data *hapd, const u8 *addr) { struct sta_info *sta = ap_get_sta(hapd, addr); +#ifdef CONFIG_IEEE80211BE + struct hostapd_data *orig_hapd = hapd; + + if (!sta && hapd->conf->mld_ap) { + hapd = hostapd_find_by_sta(hapd->iface, addr, true, &sta); + if (!hapd) { + wpa_printf(MSG_DEBUG, + "No partner link BSS found for STA " MACSTR + " - fallback to received context", + MAC2STR(addr)); + hapd = orig_hapd; + } + } +#endif /* CONFIG_IEEE80211BE */ if (!sta || !hapd->conf->disassoc_low_ack || sta->agreed_to_steer) return; diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index 3d07790e0..642b327d1 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -2062,9 +2062,9 @@ static void send_scan_event(struct i802_bss *bss, int aborted, } -static void nl80211_cqm_event(struct wpa_driver_nl80211_data *drv, - struct nlattr *tb[]) +static void nl80211_cqm_event(struct i802_bss *bss, struct nlattr *tb[]) { + struct wpa_driver_nl80211_data *drv = bss->drv; static struct nla_policy cqm_policy[NL80211_ATTR_CQM_MAX + 1] = { [NL80211_ATTR_CQM_RSSI_THOLD] = { .type = NLA_U32 }, [NL80211_ATTR_CQM_RSSI_HYST] = { .type = NLA_U8 }, @@ -2099,7 +2099,7 @@ static void nl80211_cqm_event(struct wpa_driver_nl80211_data *drv, wpa_printf(MSG_DEBUG, "nl80211: Packet loss event for " MACSTR " (num_packets %u)", MAC2STR(ed.low_ack.addr), ed.low_ack.num_packets); - wpa_supplicant_event(drv->ctx, EVENT_STATION_LOW_ACK, &ed); + wpa_supplicant_event(bss->ctx, EVENT_STATION_LOW_ACK, &ed); return; } @@ -4051,7 +4051,7 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd, mlme_event_remain_on_channel(drv, 1, tb); break; case NL80211_CMD_NOTIFY_CQM: - nl80211_cqm_event(drv, tb); + nl80211_cqm_event(bss, tb); break; case NL80211_CMD_REG_CHANGE: case NL80211_CMD_WIPHY_REG_CHANGE: