diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 130b6ebc6..14c225bf6 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -4387,6 +4387,11 @@ static int hostapd_fill_csa_settings(struct hostapd_data *hapd, settings->link_id = hapd->mld_link_id; #endif /* CONFIG_IEEE80211BE */ +#ifdef CONFIG_IEEE80211AX + settings->ubpr.unsol_bcast_probe_resp_tmpl = + hostapd_unsol_bcast_probe_resp(hapd, &settings->ubpr); +#endif /* CONFIG_IEEE80211AX */ + return 0; } @@ -4448,6 +4453,9 @@ int hostapd_switch_channel(struct hostapd_data *hapd, ret = hostapd_drv_switch_channel(hapd, settings); free_beacon_data(&settings->beacon_csa); free_beacon_data(&settings->beacon_after); +#ifdef CONFIG_IEEE80211AX + os_free(settings->ubpr.unsol_bcast_probe_resp_tmpl); +#endif /* CONFIG_IEEE80211AX */ if (ret) { /* if we failed, clean cs parameters */ diff --git a/src/drivers/driver.h b/src/drivers/driver.h index e2fc85482..d467e94d5 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -2732,6 +2732,7 @@ struct beacon_data { * @counter_offset_presp: Offset to the count field in probe resp. * @punct_bitmap - Preamble puncturing bitmap * @link_id: Link ID to determine the link for MLD; -1 for non-MLD + * @ubpr: Unsolicited broadcast Probe Response frame data */ struct csa_settings { u8 cs_count; @@ -2746,6 +2747,8 @@ struct csa_settings { u16 punct_bitmap; int link_id; + + struct unsol_bcast_probe_resp ubpr; }; /** diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 4ad0f39b5..5ef790f31 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -11308,6 +11308,13 @@ static int nl80211_switch_channel(void *priv, struct csa_settings *settings) goto fail; nla_nest_end(msg, beacon_csa); + +#ifdef CONFIG_IEEE80211AX + if (settings->ubpr.unsol_bcast_probe_resp_interval && + nl80211_unsol_bcast_probe_resp(bss, msg, &settings->ubpr) < 0) + goto fail; +#endif /* CONFIG_IEEE80211AX */ + ret = send_and_recv_cmd(drv, msg); if (ret) { wpa_printf(MSG_DEBUG, "nl80211: switch_channel failed err=%d (%s)",