diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2011-10-17 23:19:52 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-10-17 23:19:52 +0300 |
commit | c7c178e15e19dfece9ccd02de79c7cb7e7d91291 (patch) | |
tree | eabcb4fb8f9b378691dd9f39ef0c7cc8e7e30213 /src | |
parent | 3c11382b6c480c986eba7098843cf8fba65671b9 (diff) | |
download | external_wpa_supplicant_8_ti-c7c178e15e19dfece9ccd02de79c7cb7e7d91291.zip external_wpa_supplicant_8_ti-c7c178e15e19dfece9ccd02de79c7cb7e7d91291.tar.gz external_wpa_supplicant_8_ti-c7c178e15e19dfece9ccd02de79c7cb7e7d91291.tar.bz2 |
Interworking: Add Advertisement Protocol element
For now, assume that ANQP will always be enabled with Interworking.
This may be made separately configurable in the future.
Diffstat (limited to 'src')
-rw-r--r-- | src/ap/ap_drv_ops.c | 1 | ||||
-rw-r--r-- | src/ap/beacon.c | 2 | ||||
-rw-r--r-- | src/ap/ieee802_11.h | 1 | ||||
-rw-r--r-- | src/ap/ieee802_11_shared.c | 19 |
4 files changed, 23 insertions, 0 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c index 77d4909..e09c3d8 100644 --- a/src/ap/ap_drv_ops.c +++ b/src/ap/ap_drv_ops.c @@ -59,6 +59,7 @@ int hostapd_build_ap_extra_ies(struct hostapd_data *hapd, wpabuf_put_data(assocresp, buf, pos - buf); } pos = hostapd_eid_interworking(hapd, pos); + pos = hostapd_eid_adv_proto(hapd, pos); if (pos != buf) { if (wpabuf_resize(&beacon, pos - buf) != 0) goto fail; diff --git a/src/ap/beacon.c b/src/ap/beacon.c index f15467f..67dbb06 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -358,6 +358,7 @@ void handle_probe_req(struct hostapd_data *hapd, pos = hostapd_eid_ext_capab(hapd, pos); pos = hostapd_eid_interworking(hapd, pos); + pos = hostapd_eid_adv_proto(hapd, pos); /* Wi-Fi Alliance WMM */ pos = hostapd_eid_wmm(hapd, pos); @@ -493,6 +494,7 @@ void ieee802_11_set_beacon(struct hostapd_data *hapd) tailpos = hostapd_eid_ext_capab(hapd, tailpos); tailpos = hostapd_eid_interworking(hapd, tailpos); + tailpos = hostapd_eid_adv_proto(hapd, tailpos); /* Wi-Fi Alliance WMM */ tailpos = hostapd_eid_wmm(hapd, tailpos); diff --git a/src/ap/ieee802_11.h b/src/ap/ieee802_11.h index 3f73989..76fb841 100644 --- a/src/ap/ieee802_11.h +++ b/src/ap/ieee802_11.h @@ -70,5 +70,6 @@ void ieee802_11_sa_query_action(struct hostapd_data *hapd, const u8 *sa, const u8 action_type, const u8 *trans_id); u8 * hostapd_eid_interworking(struct hostapd_data *hapd, u8 *eid); +u8 * hostapd_eid_adv_proto(struct hostapd_data *hapd, u8 *eid); #endif /* IEEE802_11_H */ diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c index d325da5..1597462 100644 --- a/src/ap/ieee802_11_shared.c +++ b/src/ap/ieee802_11_shared.c @@ -243,3 +243,22 @@ u8 * hostapd_eid_interworking(struct hostapd_data *hapd, u8 *eid) return pos; } + + +u8 * hostapd_eid_adv_proto(struct hostapd_data *hapd, u8 *eid) +{ + u8 *pos = eid; +#ifdef CONFIG_INTERWORKING + + /* TODO: Separate configuration for ANQP? */ + if (!hapd->conf->interworking) + return eid; + + *pos++ = WLAN_EID_ADV_PROTO; + *pos++ = 2; + *pos++ = 0; /* Query Response Length Limit | PAME-BI */ + *pos++ = ACCESS_NETWORK_QUERY_PROTOCOL; +#endif /* CONFIG_INTERWORKING */ + + return pos; +} |