Update Probe Response template on channel switch
When AP is beaconing only on the 6 GHz band and unsol_bcast_presp interval is set, AP sends unsolicited broadcast Probe Response frames for in-band discovery. hostapd sent the Probe Response template for this frame only when setting a new Beacon frame template. Extend this to update the Probe Response template during channel switch. Signed-off-by: Rathees Kumar R Chinannan <quic_rrchinan@quicinc.com>
This commit is contained in:
parent
7d0c08910b
commit
6f1fbebeb6
3 changed files with 18 additions and 0 deletions
|
@ -4387,6 +4387,11 @@ static int hostapd_fill_csa_settings(struct hostapd_data *hapd,
|
||||||
settings->link_id = hapd->mld_link_id;
|
settings->link_id = hapd->mld_link_id;
|
||||||
#endif /* CONFIG_IEEE80211BE */
|
#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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4448,6 +4453,9 @@ int hostapd_switch_channel(struct hostapd_data *hapd,
|
||||||
ret = hostapd_drv_switch_channel(hapd, settings);
|
ret = hostapd_drv_switch_channel(hapd, settings);
|
||||||
free_beacon_data(&settings->beacon_csa);
|
free_beacon_data(&settings->beacon_csa);
|
||||||
free_beacon_data(&settings->beacon_after);
|
free_beacon_data(&settings->beacon_after);
|
||||||
|
#ifdef CONFIG_IEEE80211AX
|
||||||
|
os_free(settings->ubpr.unsol_bcast_probe_resp_tmpl);
|
||||||
|
#endif /* CONFIG_IEEE80211AX */
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
/* if we failed, clean cs parameters */
|
/* if we failed, clean cs parameters */
|
||||||
|
|
|
@ -2732,6 +2732,7 @@ struct beacon_data {
|
||||||
* @counter_offset_presp: Offset to the count field in probe resp.
|
* @counter_offset_presp: Offset to the count field in probe resp.
|
||||||
* @punct_bitmap - Preamble puncturing bitmap
|
* @punct_bitmap - Preamble puncturing bitmap
|
||||||
* @link_id: Link ID to determine the link for MLD; -1 for non-MLD
|
* @link_id: Link ID to determine the link for MLD; -1 for non-MLD
|
||||||
|
* @ubpr: Unsolicited broadcast Probe Response frame data
|
||||||
*/
|
*/
|
||||||
struct csa_settings {
|
struct csa_settings {
|
||||||
u8 cs_count;
|
u8 cs_count;
|
||||||
|
@ -2746,6 +2747,8 @@ struct csa_settings {
|
||||||
|
|
||||||
u16 punct_bitmap;
|
u16 punct_bitmap;
|
||||||
int link_id;
|
int link_id;
|
||||||
|
|
||||||
|
struct unsol_bcast_probe_resp ubpr;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11308,6 +11308,13 @@ static int nl80211_switch_channel(void *priv, struct csa_settings *settings)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
nla_nest_end(msg, beacon_csa);
|
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);
|
ret = send_and_recv_cmd(drv, msg);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: switch_channel failed err=%d (%s)",
|
wpa_printf(MSG_DEBUG, "nl80211: switch_channel failed err=%d (%s)",
|
||||||
|
|
Loading…
Add table
Reference in a new issue