aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJay Katabathuni <jkatabat@qca.qualcomm.com>2011-09-08 17:52:23 (GMT)
committerJouni Malinen <j@w1.fi>2012-05-08 20:29:58 (GMT)
commitc923b8a537752885b0b90b03f550b4bec9a8e46e (patch)
treeec7e02cfd78c778c28be5a566269257a4d1b52d5 /wpa_supplicant
parenta8918e86b6c12bfd1337dc7673dbad20e130b002 (diff)
downloadhostap-c923b8a537752885b0b90b03f550b4bec9a8e46e.zip
hostap-c923b8a537752885b0b90b03f550b4bec9a8e46e.tar.gz
hostap-c923b8a537752885b0b90b03f550b4bec9a8e46e.tar.bz2
HS 2.0: Add Hotspot 2.0 indication into Probe Request
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/hs20_supplicant.c10
-rw-r--r--wpa_supplicant/hs20_supplicant.h2
-rw-r--r--wpa_supplicant/scan.c6
3 files changed, 18 insertions, 0 deletions
diff --git a/wpa_supplicant/hs20_supplicant.c b/wpa_supplicant/hs20_supplicant.c
index 5800d55..2afa16c 100644
--- a/wpa_supplicant/hs20_supplicant.c
+++ b/wpa_supplicant/hs20_supplicant.c
@@ -23,6 +23,16 @@
#include "hs20_supplicant.h"
+void wpas_hs20_add_indication(struct wpabuf *buf)
+{
+ wpabuf_put_u8(buf, WLAN_EID_VENDOR_SPECIFIC);
+ wpabuf_put_u8(buf, 5);
+ wpabuf_put_be24(buf, OUI_WFA);
+ wpabuf_put_u8(buf, HS20_INDICATION_OUI_TYPE);
+ wpabuf_put_u8(buf, 0x00); /* Hotspot Configuration */
+}
+
+
struct wpabuf * hs20_build_anqp_req(u32 stypes, const u8 *payload,
size_t payload_len)
{
diff --git a/wpa_supplicant/hs20_supplicant.h b/wpa_supplicant/hs20_supplicant.h
index 075e52c..6eb3926 100644
--- a/wpa_supplicant/hs20_supplicant.h
+++ b/wpa_supplicant/hs20_supplicant.h
@@ -8,6 +8,8 @@
#ifndef HS20_SUPPLICANT_H
#define HS20_SUPPLICANT_H
+void wpas_hs20_add_indication(struct wpabuf *buf);
+
int hs20_anqp_send_req(struct wpa_supplicant *wpa_s, const u8 *dst, u32 stypes,
const u8 *payload, size_t payload_len);
struct wpabuf * hs20_build_anqp_req(u32 stypes, const u8 *payload,
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index f27a0fb..277b34f 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -17,6 +17,7 @@
#include "wps_supplicant.h"
#include "p2p_supplicant.h"
#include "p2p/p2p.h"
+#include "hs20_supplicant.h"
#include "notify.h"
#include "bss.h"
#include "scan.h"
@@ -626,6 +627,11 @@ ssid_list_set:
wpa_supplicant_optimize_freqs(wpa_s, &params);
extra_ie = wpa_supplicant_extra_ies(wpa_s, &params);
+#ifdef CONFIG_HS20
+ if (wpa_s->conf->hs20 && wpabuf_resize(&extra_ie, 6) == 0)
+ wpas_hs20_add_indication(extra_ie);
+#endif /* CONFIG_HS20 */
+
if (params.freqs == NULL && wpa_s->next_scan_freqs) {
wpa_dbg(wpa_s, MSG_DEBUG, "Optimize scan based on previously "
"generated frequency list");