RNR: Update Beacon frames for 6 GHz colocation

Update 2.4/5 GHz Beacon frames every time Beacon frames for co-located 6
GHz AP(s) are set. This is required for 6 GHz out-of-band discovery so
that lower band Beacon frames will include RNR element with 6 GHz AP
information irrespective of the AP bring-up order. Similarly, RNR is
included in FILS Discovery frames by default in 6 GHz-only mode,
updating the Beacon frames will remove it when co-located 2.4/5 GHz
interfaces are brought up.

This change also ensures that the changes in 6 GHz AP configuration such
as new channel and bandwidth get reflected in the lower bands Beacon
frames.

Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
This commit is contained in:
Aloka Dixit 2021-07-27 16:42:24 -07:00 committed by Jouni Malinen
parent 01efcc2929
commit f17f7ca4e0

View file

@ -1751,7 +1751,7 @@ void ieee802_11_free_ap_params(struct wpa_driver_ap_params *params)
}
int ieee802_11_set_beacon(struct hostapd_data *hapd)
static int __ieee802_11_set_beacon(struct hostapd_data *hapd)
{
struct wpa_driver_ap_params params;
struct hostapd_freq_params freq;
@ -1840,6 +1840,42 @@ fail:
}
int ieee802_11_set_beacon(struct hostapd_data *hapd)
{
struct hostapd_iface *iface = hapd->iface;
int ret;
size_t i, j;
bool is_6g;
ret = __ieee802_11_set_beacon(hapd);
if (ret != 0)
return ret;
if (!iface->interfaces || iface->interfaces->count <= 1)
return 0;
/* Update Beacon frames in case of 6 GHz colocation */
is_6g = is_6ghz_op_class(iface->conf->op_class);
for (j = 0; j < iface->interfaces->count; j++) {
struct hostapd_iface *colocated;
colocated = iface->interfaces->iface[j];
if (colocated == iface || !colocated || !colocated->conf)
continue;
if (is_6g == is_6ghz_op_class(colocated->conf->op_class))
continue;
for (i = 0; i < colocated->num_bss; i++) {
if (colocated->bss[i] && colocated->bss[i]->started)
__ieee802_11_set_beacon(colocated->bss[i]);
}
}
return 0;
}
int ieee802_11_set_beacons(struct hostapd_iface *iface)
{
size_t i;