aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/sme.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2011-10-16 16:04:46 (GMT)
committerJouni Malinen <j@w1.fi>2011-10-16 20:55:34 (GMT)
commit92cbcf91286cc7a5328ae6798673dcd01cab8e6f (patch)
tree4fd33651e37080028ebaad781eabeda234bc7d1c /wpa_supplicant/sme.c
parent46ee0427b13d64dc4695fda24f4f228c99822c11 (diff)
downloadhostap-92cbcf91286cc7a5328ae6798673dcd01cab8e6f.zip
hostap-92cbcf91286cc7a5328ae6798673dcd01cab8e6f.tar.gz
hostap-92cbcf91286cc7a5328ae6798673dcd01cab8e6f.tar.bz2
Add Extended Capability element to AssocReq for Interworking
If Interworking is enabled, add Extended Capability element to (Re)Association Request frames to indicate support for Interworking.
Diffstat (limited to 'wpa_supplicant/sme.c')
-rw-r--r--wpa_supplicant/sme.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 4cb5062..06ebb81 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -237,6 +237,24 @@ void sme_authenticate(struct wpa_supplicant *wpa_s,
}
#endif /* CONFIG_P2P */
+#ifdef CONFIG_INTERWORKING
+ if (wpa_s->conf->interworking) {
+ u8 *pos = wpa_s->sme.assoc_req_ie;
+ if (wpa_s->sme.assoc_req_ie_len > 0 && pos[0] == WLAN_EID_RSN)
+ pos += 2 + pos[1];
+ os_memmove(pos + 6, pos,
+ wpa_s->sme.assoc_req_ie_len -
+ (pos - wpa_s->sme.assoc_req_ie));
+ wpa_s->sme.assoc_req_ie_len += 6;
+ *pos++ = WLAN_EID_EXT_CAPAB;
+ *pos++ = 4;
+ *pos++ = 0x00;
+ *pos++ = 0x00;
+ *pos++ = 0x00;
+ *pos++ = 0x80; /* Bit 31 - Interworking */
+ }
+#endif /* CONFIG_INTERWORKING */
+
wpa_supplicant_cancel_sched_scan(wpa_s);
wpa_supplicant_cancel_scan(wpa_s);