AP: Add support for BSS load element (STA Count, Channel Utilization)
The new "bss_load_update_period" parameter can be used to configure hostapd to advertise its BSS Load element in Beacon and Probe Response frames. This parameter is in the units of BUs (Beacon Units). When enabled, the STA Count and the Channel Utilization value will be updated periodically in the BSS Load element. The AAC is set to 0 sinze explicit admission control is not supported. Channel Utilization is calculated based on the channel survey information from the driver and as such, requires a driver that supports providing that information for the current operating channel. Signed-off-by: Kyeyoon Park <kyeyoonp@qca.qualcomm.com>
This commit is contained in:
parent
8a5cc2fe38
commit
ec8f36afca
13 changed files with 171 additions and 2 deletions
|
@ -34,16 +34,27 @@
|
|||
|
||||
static u8 * hostapd_eid_bss_load(struct hostapd_data *hapd, u8 *eid, size_t len)
|
||||
{
|
||||
if (len < 2 + 5)
|
||||
return eid;
|
||||
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (hapd->conf->bss_load_test_set) {
|
||||
if (2 + 5 > len)
|
||||
return eid;
|
||||
*eid++ = WLAN_EID_BSS_LOAD;
|
||||
*eid++ = 5;
|
||||
os_memcpy(eid, hapd->conf->bss_load_test, 5);
|
||||
eid += 5;
|
||||
return eid;
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
if (hapd->conf->bss_load_update_period) {
|
||||
*eid++ = WLAN_EID_BSS_LOAD;
|
||||
*eid++ = 5;
|
||||
WPA_PUT_LE16(eid, hapd->num_sta);
|
||||
eid += 2;
|
||||
*eid++ = hapd->iface->channel_utilization;
|
||||
WPA_PUT_LE16(eid, 0); /* no available admission capabity */
|
||||
eid += 2;
|
||||
}
|
||||
return eid;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue