aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/sme.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2011-10-03 15:10:23 (GMT)
committerJouni Malinen <j@w1.fi>2012-05-08 20:30:04 (GMT)
commitcb4183249f517bf7cb50fba1a571b05e77f4613d (patch)
tree870194aa0ba250f09a00604b906d59f2c9f20401 /wpa_supplicant/sme.c
parentc923b8a537752885b0b90b03f550b4bec9a8e46e (diff)
downloadhostap-cb4183249f517bf7cb50fba1a571b05e77f4613d.zip
hostap-cb4183249f517bf7cb50fba1a571b05e77f4613d.tar.gz
hostap-cb4183249f517bf7cb50fba1a571b05e77f4613d.tar.bz2
HS 2.0: Add HS 2.0 Indication element into (Re)Association Request
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/sme.c')
-rw-r--r--wpa_supplicant/sme.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index cf5e08d..1586a5a 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -26,6 +26,7 @@
#include "bss.h"
#include "scan.h"
#include "sme.h"
+#include "hs20_supplicant.h"
#define SME_AUTH_TIMEOUT 5
#define SME_ASSOC_TIMEOUT 5
@@ -222,6 +223,21 @@ void sme_authenticate(struct wpa_supplicant *wpa_s,
}
#endif /* CONFIG_P2P */
+#ifdef CONFIG_HS20
+ if (wpa_s->conf->hs20) {
+ struct wpabuf *hs20;
+ hs20 = wpabuf_alloc(20);
+ if (hs20) {
+ wpas_hs20_add_indication(hs20);
+ os_memcpy(wpa_s->sme.assoc_req_ie +
+ wpa_s->sme.assoc_req_ie_len,
+ wpabuf_head(hs20), wpabuf_len(hs20));
+ wpa_s->sme.assoc_req_ie_len += wpabuf_len(hs20);
+ wpabuf_free(hs20);
+ }
+ }
+#endif /* CONFIG_HS20 */
+
#ifdef CONFIG_INTERWORKING
if (wpa_s->conf->interworking) {
u8 *pos = wpa_s->sme.assoc_req_ie;