Send RM Enabled Capabilities element in (Re)Association Response frame
(Re)Association Response frames should include radio measurement capabilities in order to let stations know if they can, e.g., use neighbor requests. I tested this commit with a Samsung S8, which does not send neighbor requests without this commit and sends them afterwards. Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
This commit is contained in:
parent
23dc196fde
commit
96a2a9a88b
3 changed files with 26 additions and 21 deletions
|
@ -36,27 +36,6 @@
|
||||||
|
|
||||||
#ifdef NEED_AP_MLME
|
#ifdef NEED_AP_MLME
|
||||||
|
|
||||||
static u8 * hostapd_eid_rm_enabled_capab(struct hostapd_data *hapd, u8 *eid,
|
|
||||||
size_t len)
|
|
||||||
{
|
|
||||||
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++ = RRM_CAPABILITIES_IE_LEN;
|
|
||||||
os_memcpy(eid, hapd->conf->radio_measurements, RRM_CAPABILITIES_IE_LEN);
|
|
||||||
|
|
||||||
return eid + RRM_CAPABILITIES_IE_LEN;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static u8 * hostapd_eid_bss_load(struct hostapd_data *hapd, u8 *eid, size_t len)
|
static u8 * hostapd_eid_bss_load(struct hostapd_data *hapd, u8 *eid, size_t len)
|
||||||
{
|
{
|
||||||
if (len < 2 + 5)
|
if (len < 2 + 5)
|
||||||
|
|
|
@ -199,6 +199,27 @@ u8 * hostapd_eid_ext_supp_rates(struct hostapd_data *hapd, u8 *eid)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
u8 * hostapd_eid_rm_enabled_capab(struct hostapd_data *hapd, u8 *eid,
|
||||||
|
size_t len)
|
||||||
|
{
|
||||||
|
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++ = RRM_CAPABILITIES_IE_LEN;
|
||||||
|
os_memcpy(eid, hapd->conf->radio_measurements, RRM_CAPABILITIES_IE_LEN);
|
||||||
|
|
||||||
|
return eid + RRM_CAPABILITIES_IE_LEN;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
u16 hostapd_own_capab_info(struct hostapd_data *hapd)
|
u16 hostapd_own_capab_info(struct hostapd_data *hapd)
|
||||||
{
|
{
|
||||||
int capab = WLAN_CAPABILITY_ESS;
|
int capab = WLAN_CAPABILITY_ESS;
|
||||||
|
@ -3684,6 +3705,9 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
/* Extended supported rates */
|
/* Extended supported rates */
|
||||||
p = hostapd_eid_ext_supp_rates(hapd, p);
|
p = hostapd_eid_ext_supp_rates(hapd, p);
|
||||||
|
|
||||||
|
/* Radio measurement capabilities */
|
||||||
|
p = hostapd_eid_rm_enabled_capab(hapd, p, buf + buflen - p);
|
||||||
|
|
||||||
#ifdef CONFIG_MBO
|
#ifdef CONFIG_MBO
|
||||||
if (status_code == WLAN_STATUS_DENIED_POOR_CHANNEL_CONDITIONS &&
|
if (status_code == WLAN_STATUS_DENIED_POOR_CHANNEL_CONDITIONS &&
|
||||||
rssi != 0) {
|
rssi != 0) {
|
||||||
|
|
|
@ -49,6 +49,8 @@ u8 * hostapd_eid_ext_capab(struct hostapd_data *hapd, u8 *eid);
|
||||||
u8 * hostapd_eid_qos_map_set(struct hostapd_data *hapd, u8 *eid);
|
u8 * hostapd_eid_qos_map_set(struct hostapd_data *hapd, u8 *eid);
|
||||||
u8 * hostapd_eid_supp_rates(struct hostapd_data *hapd, u8 *eid);
|
u8 * hostapd_eid_supp_rates(struct hostapd_data *hapd, u8 *eid);
|
||||||
u8 * hostapd_eid_ext_supp_rates(struct hostapd_data *hapd, u8 *eid);
|
u8 * hostapd_eid_ext_supp_rates(struct hostapd_data *hapd, u8 *eid);
|
||||||
|
u8 * hostapd_eid_rm_enabled_capab(struct hostapd_data *hapd, u8 *eid,
|
||||||
|
size_t len);
|
||||||
u8 * hostapd_eid_ht_capabilities(struct hostapd_data *hapd, u8 *eid);
|
u8 * hostapd_eid_ht_capabilities(struct hostapd_data *hapd, u8 *eid);
|
||||||
u8 * hostapd_eid_ht_operation(struct hostapd_data *hapd, u8 *eid);
|
u8 * hostapd_eid_ht_operation(struct hostapd_data *hapd, u8 *eid);
|
||||||
u8 * hostapd_eid_secondary_channel(struct hostapd_data *hapd, u8 *eid);
|
u8 * hostapd_eid_secondary_channel(struct hostapd_data *hapd, u8 *eid);
|
||||||
|
|
Loading…
Reference in a new issue