aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorAvraham Stern <avraham.stern@intel.com>2017-03-09 13:19:58 (GMT)
committerJouni Malinen <j@w1.fi>2017-03-10 14:53:10 (GMT)
commit2316cb358c854a013bc27ac76c63d0e1ed663475 (patch)
tree3741d6c6ff74611cf3a54e5988919f7cd9e35906 /wpa_supplicant/ctrl_iface.c
parentf7c25d1a509ec439ee872f1496ebfdfe9e92d402 (diff)
downloadhostap-2316cb358c854a013bc27ac76c63d0e1ed663475.zip
hostap-2316cb358c854a013bc27ac76c63d0e1ed663475.tar.gz
hostap-2316cb358c854a013bc27ac76c63d0e1ed663475.tar.bz2
MBO: Add option to add MBO query list to ANQP query
MBO techspec v0.0_r27 changed the MBO ANQP-element format. The MBO element in ANQP query should now include an MBO Query List element that contains a list of MBO elements to query. Add API to add the MBO Query List to an ANQP query. Format: ANQP_GET <addr> <info_id>[,<info_id>]...[,mbo:<subtype>...] Example for querying neighbor report with MBO cellular data connection preference: ANQP_GET <bssid> 272,mbo:2 Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 14dcdcd..5aa3542 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -6712,7 +6712,7 @@ static int get_anqp(struct wpa_supplicant *wpa_s, char *dst)
u16 id[MAX_ANQP_INFO_ID];
size_t num_id = 0;
u32 subtypes = 0;
- int get_cell_pref = 0;
+ u32 mbo_subtypes = 0;
used = hwaddr_aton2(dst, dst_addr);
if (used < 0)
@@ -6733,9 +6733,10 @@ static int get_anqp(struct wpa_supplicant *wpa_s, char *dst)
} else if (os_strncmp(pos, "mbo:", 4) == 0) {
#ifdef CONFIG_MBO
int num = atoi(pos + 4);
- if (num != MBO_ANQP_SUBTYPE_CELL_CONN_PREF)
+
+ if (num <= 0 || num > MAX_MBO_ANQP_SUBTYPE)
return -1;
- get_cell_pref = 1;
+ mbo_subtypes |= BIT(num);
#else /* CONFIG_MBO */
return -1;
#endif /* CONFIG_MBO */
@@ -6754,7 +6755,7 @@ static int get_anqp(struct wpa_supplicant *wpa_s, char *dst)
return -1;
return anqp_send_req(wpa_s, dst_addr, id, num_id, subtypes,
- get_cell_pref);
+ mbo_subtypes);
}