}
hapd->sta_aid[(sta->aid - 1) / 32] |= BIT((sta->aid - 1) % 32);
sta->listen_interval = origin_sta->listen_interval;
- update_ht_state(hapd, sta);
+ if (update_ht_state(hapd, sta) > 0)
+ ieee802_11_update_beacons(hapd->iface);
/* RSN Authenticator should always be the one on the original station */
wpa_auth_sta_deinit(sta->wpa_sm);
int delay_assoc = 0;
#endif /* CONFIG_FILS */
int omit_rsnxe = 0;
+ bool set_beacon = false;
if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_req) :
sizeof(mgmt->u.assoc_req))) {
sta->nonerp_set = 1;
hapd->iface->num_sta_non_erp++;
if (hapd->iface->num_sta_non_erp == 1)
- ieee802_11_update_beacons(hapd->iface);
+ set_beacon = true;
}
if (!(sta->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME) &&
hapd->iface->current_mode->mode ==
HOSTAPD_MODE_IEEE80211G &&
hapd->iface->num_sta_no_short_slot_time == 1)
- ieee802_11_update_beacons(hapd->iface);
+ set_beacon = true;
}
if (sta->capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
if (hapd->iface->current_mode &&
hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G
&& hapd->iface->num_sta_no_short_preamble == 1)
- ieee802_11_update_beacons(hapd->iface);
+ set_beacon = true;
}
- update_ht_state(hapd, sta);
+ if (update_ht_state(hapd, sta) > 0)
+ set_beacon = true;
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_DEBUG,
}
#endif /* CONFIG_FILS */
+ if (set_beacon)
+ ieee802_11_set_beacons(hapd->iface);
+
fail:
/*
u16 copy_sta_vendor_vht(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *ie, size_t len);
-void update_ht_state(struct hostapd_data *hapd, struct sta_info *sta);
+int update_ht_state(struct hostapd_data *hapd, struct sta_info *sta);
void ht40_intolerant_add(struct hostapd_iface *iface, struct sta_info *sta);
void ht40_intolerant_remove(struct hostapd_iface *iface, struct sta_info *sta);
u16 copy_sta_vht_capab(struct hostapd_data *hapd, struct sta_info *sta,
}
-void update_ht_state(struct hostapd_data *hapd, struct sta_info *sta)
+int update_ht_state(struct hostapd_data *hapd, struct sta_info *sta)
{
if ((sta->flags & WLAN_STA_HT) && sta->ht_capabilities)
update_sta_ht(hapd, sta);
else
update_sta_no_ht(hapd, sta);
- if (hostapd_ht_operation_update(hapd->iface) > 0)
- ieee802_11_update_beacons(hapd->iface);
+ return hostapd_ht_operation_update(hapd->iface);
}
#include "ap/hostapd.h"
#include "ap/sta_info.h"
#include "ap/ieee802_11.h"
+#include "ap/beacon.h"
#include "ap/wpa_auth.h"
#include "wpa_supplicant_i.h"
#include "driver_i.h"
set_disable_ht40(sta->ht_capabilities, 1);
}
- update_ht_state(data, sta);
+ if (update_ht_state(data, sta) > 0)
+ ieee802_11_update_beacons(data->iface);
#ifdef CONFIG_IEEE80211AC
copy_sta_vht_capab(data, sta, elems->vht_capabilities);