Update Probe Response template on BSS color change
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 BSS color change. Signed-off-by: Rathees Kumar R Chinannan <quic_rrchinan@quicinc.com>
This commit is contained in:
parent
6f1fbebeb6
commit
51b5b9512f
3 changed files with 14 additions and 0 deletions
|
@ -4571,6 +4571,9 @@ static int hostapd_fill_cca_settings(struct hostapd_data *hapd,
|
|||
return ret;
|
||||
}
|
||||
|
||||
settings->ubpr.unsol_bcast_probe_resp_tmpl =
|
||||
hostapd_unsol_bcast_probe_resp(hapd, &settings->ubpr);
|
||||
|
||||
settings->counter_offset_beacon = hapd->cca_c_off_beacon;
|
||||
settings->counter_offset_presp = hapd->cca_c_off_proberesp;
|
||||
|
||||
|
@ -4633,6 +4636,7 @@ static void hostapd_switch_color_timeout_handler(void *eloop_data,
|
|||
|
||||
free_beacon_data(&settings.beacon_cca);
|
||||
free_beacon_data(&settings.beacon_after);
|
||||
os_free(settings.ubpr.unsol_bcast_probe_resp_tmpl);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2760,6 +2760,7 @@ struct csa_settings {
|
|||
* @beacon_after: Next Beacon/Probe Response/(Re)Association Response frame info
|
||||
* @counter_offset_beacon: Offset to the count field in Beacon frame tail
|
||||
* @counter_offset_presp: Offset to the count field in Probe Response frame
|
||||
* @ubpr: Unsolicited broadcast Probe Response frame data
|
||||
*/
|
||||
struct cca_settings {
|
||||
u8 cca_count;
|
||||
|
@ -2770,6 +2771,8 @@ struct cca_settings {
|
|||
|
||||
u16 counter_offset_beacon;
|
||||
u16 counter_offset_presp;
|
||||
|
||||
struct unsol_bcast_probe_resp ubpr;
|
||||
};
|
||||
|
||||
/* TDLS peer capabilities for send_tdls_mgmt() */
|
||||
|
|
|
@ -11396,6 +11396,13 @@ static int nl80211_switch_color(void *priv, struct cca_settings *settings)
|
|||
}
|
||||
|
||||
nla_nest_end(msg, beacon_cca);
|
||||
|
||||
if (settings->ubpr.unsol_bcast_probe_resp_interval &&
|
||||
nl80211_unsol_bcast_probe_resp(bss, msg, &settings->ubpr) < 0) {
|
||||
ret = -ENOBUFS;
|
||||
goto error;
|
||||
}
|
||||
|
||||
ret = send_and_recv_cmd(drv, msg);
|
||||
if (ret) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
|
|
Loading…
Add table
Reference in a new issue