aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2014-11-05 08:42:56 (GMT)
committerJouni Malinen <j@w1.fi>2014-11-22 19:45:07 (GMT)
commit70d1e72849c3ff0e762f6f4cdb6173ef74a9a4aa (patch)
tree1d1fa41167f3e4c40bbe45742a885200c15e9756 /wpa_supplicant/events.c
parent7dc0338806ac263de74986a20f8f85adf5764326 (diff)
downloadhostap-70d1e72849c3ff0e762f6f4cdb6173ef74a9a4aa.zip
hostap-70d1e72849c3ff0e762f6f4cdb6173ef74a9a4aa.tar.gz
hostap-70d1e72849c3ff0e762f6f4cdb6173ef74a9a4aa.tar.bz2
wpa_supplicant: Handle link measurement requests
Send link measurement response when a request is received. Advertise only RCPI, computing it from the RSSI of the request. The TX power field is left to be filled by the driver. All other fields are not published. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 6609816..06b09ef 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2785,7 +2785,8 @@ static void wpa_supplicant_update_channel_list(
static void wpas_event_rx_mgmt_action(struct wpa_supplicant *wpa_s,
- const u8 *frame, size_t len, int freq)
+ const u8 *frame, size_t len, int freq,
+ int rssi)
{
const struct ieee80211_mgmt *mgmt;
const u8 *payload;
@@ -2872,6 +2873,14 @@ static void wpas_event_rx_mgmt_action(struct wpa_supplicant *wpa_s,
return;
}
+ if (category == WLAN_ACTION_RADIO_MEASUREMENT &&
+ payload[0] == WLAN_RRM_LINK_MEASUREMENT_REQUEST) {
+ wpas_rrm_handle_link_measurement_request(wpa_s, mgmt->sa,
+ payload + 1, plen - 1,
+ rssi);
+ return;
+ }
+
wpas_p2p_rx_action(wpa_s, mgmt->da, mgmt->sa, mgmt->bssid,
category, payload, plen, freq);
if (wpa_s->ifmsh)
@@ -3258,7 +3267,8 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
wpas_event_rx_mgmt_action(
wpa_s, data->rx_mgmt.frame,
data->rx_mgmt.frame_len,
- data->rx_mgmt.freq);
+ data->rx_mgmt.freq,
+ data->rx_mgmt.ssi_signal);
break;
}