aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunil Dutt <usdutt@codeaurora.org>2020-04-27 09:06:16 (GMT)
committerJouni Malinen <j@w1.fi>2020-05-20 21:30:54 (GMT)
commitdb0d0b84af89dcf7bb09a666931d97d93f80e749 (patch)
tree7f620ac571600ed01d45e081df6b82f044416557
parentdd2daf0848ed8854065cc5cfca07a0538cd380af (diff)
downloadhostap-db0d0b84af89dcf7bb09a666931d97d93f80e749.zip
hostap-db0d0b84af89dcf7bb09a666931d97d93f80e749.tar.gz
hostap-db0d0b84af89dcf7bb09a666931d97d93f80e749.tar.bz2
nl80211: Control the registration for RRM frame with driver_param
wpa_supplicant registered to process the Radio Measurement Request frames unconditionally. This would prevent other location based applications from handling these frames. Enable such a use case by allowing wpa_supplicant to be configured not to register to process these frames. This can now be done by adding "no_rrm=1" to the driver_param configuration parameter. In addition, wpa_driver_nl80211_init() does not have the provision to take driver_params. Hence, resubscribe again with cfg80211 when this driver parameter "no_rrm=1" is set after the initial setup steps. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--src/drivers/driver_nl80211.c15
-rw-r--r--src/drivers/driver_nl80211.h1
2 files changed, 15 insertions, 1 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 8be593a..72189da 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -2372,7 +2372,8 @@ static int nl80211_mgmt_subscribe_non_ap(struct i802_bss *bss)
ret = -1;
/* Radio Measurement - Radio Measurement Request */
- if (nl80211_register_action_frame(bss, (u8 *) "\x05\x00", 2) < 0)
+ if (!drv->no_rrm &&
+ nl80211_register_action_frame(bss, (u8 *) "\x05\x00", 2) < 0)
ret = -1;
/* Radio Measurement - Link Measurement Request */
@@ -8239,6 +8240,18 @@ static int nl80211_set_param(void *priv, const char *param)
if (os_strstr(param, "full_ap_client_state=0"))
drv->capa.flags &= ~WPA_DRIVER_FLAGS_FULL_AP_CLIENT_STATE;
+ if (os_strstr(param, "no_rrm=1")) {
+ drv->no_rrm = 1;
+
+ if (!bss->in_deinit && !is_ap_interface(drv->nlmode) &&
+ !is_mesh_interface(drv->nlmode)) {
+ nl80211_mgmt_unsubscribe(bss, "no_rrm=1");
+ if (nl80211_mgmt_subscribe_non_ap(bss) < 0)
+ wpa_printf(MSG_DEBUG,
+ "nl80211: Failed to re-register Action frame processing - ignore for now");
+ }
+ }
+
return 0;
}
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
index 895f9d7..1dd5aee 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -173,6 +173,7 @@ struct wpa_driver_nl80211_data {
unsigned int add_sta_node_vendor_cmd_avail:1;
unsigned int control_port_ap:1;
unsigned int multicast_registrations:1;
+ unsigned int no_rrm:1;
u64 vendor_scan_cookie;
u64 remain_on_chan_cookie;