From 4051dd86672d571eed66c067edd8e788e348c682 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 16 Nov 2016 20:13:53 +0200 Subject: [PATCH] GAS: Add Capability List ANQP-element support for Info ID 270, 280..299 This extends the anqp_elem configuration parameter support for new Info IDs (270 (TDLS Capability) was previously missed from the list of defined values, 280 has already been assigned in REVmc/D8.0; 281..299 are yet to be assigned). No additional source code changes are needed to allow hostapd to advertise support for these if the ANQP-element value is set with the anqp_elem parameter. Signed-off-by: Jouni Malinen --- src/ap/gas_serv.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ap/gas_serv.c b/src/ap/gas_serv.c index 6ce178de3..b4306c669 100644 --- a/src/ap/gas_serv.c +++ b/src/ap/gas_serv.c @@ -255,6 +255,8 @@ static void anqp_add_capab_list(struct hostapd_data *hapd, wpabuf_put_le16(buf, ANQP_DOMAIN_NAME); if (get_anqp_elem(hapd, ANQP_EMERGENCY_ALERT_URI)) wpabuf_put_le16(buf, ANQP_EMERGENCY_ALERT_URI); + if (get_anqp_elem(hapd, ANQP_TDLS_CAPABILITY)) + wpabuf_put_le16(buf, ANQP_TDLS_CAPABILITY); if (get_anqp_elem(hapd, ANQP_EMERGENCY_NAI)) wpabuf_put_le16(buf, ANQP_EMERGENCY_NAI); if (get_anqp_elem(hapd, ANQP_NEIGHBOR_REPORT)) @@ -269,6 +271,10 @@ static void anqp_add_capab_list(struct hostapd_data *hapd, wpabuf_put_le16(buf, ANQP_ADVICE_OF_CHARGE); if (get_anqp_elem(hapd, ANQP_LOCAL_CONTENT)) wpabuf_put_le16(buf, ANQP_LOCAL_CONTENT); + for (id = 280; id < 300; id++) { + if (get_anqp_elem(hapd, id)) + wpabuf_put_le16(buf, id); + } #ifdef CONFIG_HS20 anqp_add_hs_capab_list(hapd, buf); #endif /* CONFIG_HS20 */