Update Beacon frames after color change
Once CCA is finished, Beacon frames need to be updated. The BCCA element needs to be removed and the new color value shall be advertised in the BSS Color Information field of the HE Operation element. Update the Beacon frames accordingly. Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
This commit is contained in:
parent
5913d1a187
commit
ecfe2aa61b
1 changed files with 28 additions and 4 deletions
|
@ -2383,6 +2383,32 @@ static void hostapd_eapol_tx_status(struct hostapd_data *hapd, const u8 *dst,
|
||||||
#endif /* NEED_AP_MLME */
|
#endif /* NEED_AP_MLME */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef CONFIG_IEEE80211AX
|
||||||
|
static void hostapd_event_color_change(struct hostapd_data *hapd, bool success)
|
||||||
|
{
|
||||||
|
struct hostapd_data *bss;
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; i < hapd->iface->num_bss; i++) {
|
||||||
|
bss = hapd->iface->bss[i];
|
||||||
|
if (bss->cca_color == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (success)
|
||||||
|
hapd->iface->conf->he_op.he_bss_color = bss->cca_color;
|
||||||
|
|
||||||
|
bss->cca_in_progress = 0;
|
||||||
|
if (ieee802_11_set_beacon(bss)) {
|
||||||
|
wpa_printf(MSG_ERROR, "Failed to remove BCCA element");
|
||||||
|
bss->cca_in_progress = 1;
|
||||||
|
} else {
|
||||||
|
hostapd_cleanup_cca_params(bss);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_IEEE80211AX */
|
||||||
|
|
||||||
|
|
||||||
void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||||
union wpa_event_data *data)
|
union wpa_event_data *data)
|
||||||
{
|
{
|
||||||
|
@ -2720,14 +2746,12 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||||
case EVENT_CCA_ABORTED_NOTIFY:
|
case EVENT_CCA_ABORTED_NOTIFY:
|
||||||
wpa_printf(MSG_DEBUG, "CCA aborted on %s",
|
wpa_printf(MSG_DEBUG, "CCA aborted on %s",
|
||||||
hapd->conf->iface);
|
hapd->conf->iface);
|
||||||
hostapd_cleanup_cca_params(hapd);
|
hostapd_event_color_change(hapd, false);
|
||||||
break;
|
break;
|
||||||
case EVENT_CCA_NOTIFY:
|
case EVENT_CCA_NOTIFY:
|
||||||
wpa_printf(MSG_DEBUG, "CCA finished on %s",
|
wpa_printf(MSG_DEBUG, "CCA finished on %s",
|
||||||
hapd->conf->iface);
|
hapd->conf->iface);
|
||||||
if (hapd->cca_color)
|
hostapd_event_color_change(hapd, true);
|
||||||
hapd->iface->conf->he_op.he_bss_color = hapd->cca_color;
|
|
||||||
hostapd_cleanup_cca_params(hapd);
|
|
||||||
break;
|
break;
|
||||||
#endif /* CONFIG_IEEE80211AX */
|
#endif /* CONFIG_IEEE80211AX */
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue