Cumulative patch from commit cf28c66bcb8883e6be921d6406a534e4a5b45b96
cf28c66 HS 2.0: Extend ANQP_GET to accept Hotspot 2.0 subtypes
163f801 nl80211: Indicate HS 2.0 OSEN AKM in connect/associate command
c201f93 WPS: Enable WSC 2.0 support unconditionally
91364b7 P2P: Set a timeout for a persistent reinvoke on a P2P Client
41d5ce9 P2P: Optimize scan for GO during persistent group invocation
4d1e38b ACS: Fix number of error path issues
Change-Id: I31a51d3dba055d1a906516bb08894effec327da9
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 704caa1..925ece1 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -2163,10 +2163,8 @@
return pos;
if (wps_is_selected_pbc_registrar(wps_ie))
txt = "[WPS-PBC]";
-#ifdef CONFIG_WPS2
else if (wps_is_addr_authorized(wps_ie, wpa_s->own_addr, 0))
txt = "[WPS-AUTH]";
-#endif /* CONFIG_WPS2 */
else if (wps_is_selected_pin_registrar(wps_ie))
txt = "[WPS-PIN]";
else
@@ -4947,15 +4945,27 @@
#define MAX_ANQP_INFO_ID 100
u16 id[MAX_ANQP_INFO_ID];
size_t num_id = 0;
+ u32 subtypes = 0;
used = hwaddr_aton2(dst, dst_addr);
if (used < 0)
return -1;
pos = dst + used;
while (num_id < MAX_ANQP_INFO_ID) {
- id[num_id] = atoi(pos);
- if (id[num_id])
- num_id++;
+ if (os_strncmp(pos, "hs20:", 5) == 0) {
+#ifdef CONFIG_HS20
+ int num = atoi(pos + 5);
+ if (num <= 0 || num > 31)
+ return -1;
+ subtypes |= BIT(num);
+#else /* CONFIG_HS20 */
+ return -1;
+#endif /* CONFIG_HS20 */
+ } else {
+ id[num_id] = atoi(pos);
+ if (id[num_id])
+ num_id++;
+ }
pos = os_strchr(pos + 1, ',');
if (pos == NULL)
break;
@@ -4965,7 +4975,7 @@
if (num_id == 0)
return -1;
- return anqp_send_req(wpa_s, dst_addr, id, num_id);
+ return anqp_send_req(wpa_s, dst_addr, id, num_id, subtypes);
}