aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ieee802_11.c
diff options
context:
space:
mode:
authorDavid Spinadel <david.spinadel@intel.com>2016-04-06 16:42:10 (GMT)
committerJouni Malinen <j@w1.fi>2016-04-17 09:29:12 (GMT)
commit629e1804da3bb6eed347b51922fc2fe6aa05f2e5 (patch)
tree7aff376f470d18c12ea5e09ae4e503d6cb2e83e6 /src/ap/ieee802_11.c
parent2572df34b2bffd4fc052225d5e14a837d64458c3 (diff)
downloadhostap-629e1804da3bb6eed347b51922fc2fe6aa05f2e5.zip
hostap-629e1804da3bb6eed347b51922fc2fe6aa05f2e5.tar.gz
hostap-629e1804da3bb6eed347b51922fc2fe6aa05f2e5.tar.bz2
hostapd: Save RM enabled capability of station
Save RM enabled capability element of an associating station if radio measurement is supported in its capability field. Signed-off-by: David Spinadel <david.spinadel@intel.com>
Diffstat (limited to 'src/ap/ieee802_11.c')
-rw-r--r--src/ap/ieee802_11.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 2eee05d..c108faa 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -1749,6 +1749,12 @@ static u16 check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta,
ap_copy_sta_supp_op_classes(sta, elems.supp_op_classes,
elems.supp_op_classes_len);
+ if ((sta->capability & WLAN_CAPABILITY_RADIO_MEASUREMENT) &&
+ elems.rrm_enabled &&
+ elems.rrm_enabled_len >= sizeof(sta->rrm_enabled_capa))
+ os_memcpy(sta->rrm_enabled_capa, elems.rrm_enabled,
+ sizeof(sta->rrm_enabled_capa));
+
return WLAN_STATUS_SUCCESS;
}
@@ -2094,6 +2100,12 @@ static void handle_assoc(struct hostapd_data *hapd,
}
#endif /* CONFIG_MBO */
+ /*
+ * sta->capability is used in check_assoc_ies() for RRM enabled
+ * capability element.
+ */
+ sta->capability = capab_info;
+
/* followed by SSID and Supported rates; and HT capabilities if 802.11n
* is used */
resp = check_assoc_ies(hapd, sta, pos, left, reassoc);
@@ -2107,7 +2119,6 @@ static void handle_assoc(struct hostapd_data *hapd,
goto fail;
}
- sta->capability = capab_info;
sta->listen_interval = listen_interval;
if (hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G)