aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/interworking.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2014-03-25 00:36:13 (GMT)
committerJouni Malinen <j@w1.fi>2014-03-25 16:33:21 (GMT)
commitcf28c66bcb8883e6be921d6406a534e4a5b45b96 (patch)
treebee8efd6c819bbf3cd5d29806e6890222834e3ce /wpa_supplicant/interworking.c
parent163f801ef23cd486aab5065c90dd71ad4cbb5fcd (diff)
downloadhostap-cf28c66bcb8883e6be921d6406a534e4a5b45b96.zip
hostap-cf28c66bcb8883e6be921d6406a534e4a5b45b96.tar.gz
hostap-cf28c66bcb8883e6be921d6406a534e4a5b45b96.tar.bz2
HS 2.0: Extend ANQP_GET to accept Hotspot 2.0 subtypes
This allows a single ANQP query to be used to fetch both IEEE 802.11 defined ANQP elements and Hotspot 2.0 vendor specific elements. ANQP_GET <addr> <info id>[,<info id>]... [,hs20:<subtype>][...,hs20:<subtype>] For example: ANQP_GET 00:11:22:33:44:55:66 258,268,hs20:3,hs20:4 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'wpa_supplicant/interworking.c')
-rw-r--r--wpa_supplicant/interworking.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index e3ad931..71163c3 100644
--- a/wpa_supplicant/interworking.c
+++ b/wpa_supplicant/interworking.c
@@ -2531,9 +2531,10 @@ void interworking_stop_fetch_anqp(struct wpa_supplicant *wpa_s)
int anqp_send_req(struct wpa_supplicant *wpa_s, const u8 *dst,
- u16 info_ids[], size_t num_ids)
+ u16 info_ids[], size_t num_ids, u32 subtypes)
{
struct wpabuf *buf;
+ struct wpabuf *hs20_buf = NULL;
int ret = 0;
int freq;
struct wpa_bss *bss;
@@ -2551,7 +2552,17 @@ int anqp_send_req(struct wpa_supplicant *wpa_s, const u8 *dst,
wpa_printf(MSG_DEBUG, "ANQP: Query Request to " MACSTR " for %u id(s)",
MAC2STR(dst), (unsigned int) num_ids);
- buf = anqp_build_req(info_ids, num_ids, NULL);
+#ifdef CONFIG_HS20
+ if (subtypes != 0) {
+ hs20_buf = wpabuf_alloc(100);
+ if (hs20_buf == NULL)
+ return -1;
+ hs20_put_anqp_req(subtypes, NULL, 0, hs20_buf);
+ }
+#endif /* CONFIG_HS20 */
+
+ buf = anqp_build_req(info_ids, num_ids, hs20_buf);
+ wpabuf_free(hs20_buf);
if (buf == NULL)
return -1;