hostapd: Extend the configuration of RRM capabilities
Extend the radio_measurements parameter to save all the supported RRM capabilities as it's used in RM enabled capabilities element. Make this parameter not directly configurable via config file (though, keep the radio_measurements parameter for some time for backwards compatibility). Instead, add a configuration option to enable neighbor report via radio measurements. Other features can be added later as well. Signed-off-by: David Spinadel <david.spinadel@intel.com>
This commit is contained in:
parent
56de6fe4fe
commit
010182120d
6 changed files with 38 additions and 13 deletions
|
@ -36,18 +36,21 @@
|
|||
static u8 * hostapd_eid_rm_enabled_capab(struct hostapd_data *hapd, u8 *eid,
|
||||
size_t len)
|
||||
{
|
||||
if (!hapd->conf->radio_measurements || len < 2 + 4)
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < RRM_CAPABILITIES_IE_LEN; i++) {
|
||||
if (hapd->conf->radio_measurements[i])
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == RRM_CAPABILITIES_IE_LEN || len < 2 + RRM_CAPABILITIES_IE_LEN)
|
||||
return eid;
|
||||
|
||||
*eid++ = WLAN_EID_RRM_ENABLED_CAPABILITIES;
|
||||
*eid++ = 5;
|
||||
*eid++ = (hapd->conf->radio_measurements & BIT(0)) ?
|
||||
WLAN_RRM_CAPS_NEIGHBOR_REPORT : 0x00;
|
||||
*eid++ = 0x00;
|
||||
*eid++ = 0x00;
|
||||
*eid++ = 0x00;
|
||||
*eid++ = 0x00;
|
||||
return eid;
|
||||
*eid++ = RRM_CAPABILITIES_IE_LEN;
|
||||
os_memcpy(eid, hapd->conf->radio_measurements, RRM_CAPABILITIES_IE_LEN);
|
||||
|
||||
return eid + RRM_CAPABILITIES_IE_LEN;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue