aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mbo.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-03-10 16:57:12 (GMT)
committerJouni Malinen <j@w1.fi>2017-03-10 16:57:12 (GMT)
commit34f28519027d2504168e109519112c1b12d1fdf6 (patch)
treed457ed823683d2ee304b485d3e973c6d5b4e53a2 /wpa_supplicant/mbo.c
parent941caed98009104484ca894dd49f87bf23cff091 (diff)
downloadhostap-34f28519027d2504168e109519112c1b12d1fdf6.zip
hostap-34f28519027d2504168e109519112c1b12d1fdf6.tar.gz
hostap-34f28519027d2504168e109519112c1b12d1fdf6.tar.bz2
MBO: Parse MBO ANQP-element on STA
This extends the GAS/ANQP parser in wpa_supplicant to process MBO ANQP-elements and indicate received Cellular Data Connection Preference values over the control interface. When a valid MBO ANQP-element is received, the following control interface message is sent: RX-MBO-ANQP <BSSID> cell_conn_pref=<value> Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/mbo.c')
-rw-r--r--wpa_supplicant/mbo.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/wpa_supplicant/mbo.c b/wpa_supplicant/mbo.c
index 5348b9a..138b405 100644
--- a/wpa_supplicant/mbo.c
+++ b/wpa_supplicant/mbo.c
@@ -549,3 +549,31 @@ struct wpabuf * mbo_build_anqp_buf(struct wpa_supplicant *wpa_s,
return anqp_buf;
}
+
+
+void mbo_parse_rx_anqp_resp(struct wpa_supplicant *wpa_s,
+ struct wpa_bss *bss, const u8 *sa,
+ const u8 *data, size_t slen)
+{
+ const u8 *pos = data;
+ u8 subtype;
+
+ if (slen < 1)
+ return;
+
+ subtype = *pos++;
+ slen--;
+
+ switch (subtype) {
+ case MBO_ANQP_SUBTYPE_CELL_CONN_PREF:
+ if (slen < 1)
+ break;
+ wpa_msg(wpa_s, MSG_INFO, RX_MBO_ANQP MACSTR
+ " cell_conn_pref=%u", MAC2STR(sa), *pos);
+ break;
+ default:
+ wpa_printf(MSG_DEBUG, "MBO: Unsupported ANQP subtype %u",
+ subtype);
+ break;
+ }
+}