]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
GAS: Add Capability List ANQP-element support for Info ID 270, 280..299
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 16 Nov 2016 18:13:53 +0000 (20:13 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 17 Nov 2016 14:00:25 +0000 (16:00 +0200)
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 <jouni@qca.qualcomm.com>
src/ap/gas_serv.c

index 6ce178de3b2945f0f3cd5db9532e2dd9e7d2d564..b4306c66925eb06518686a65ec8a81e4834fd998 100644 (file)
@@ -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 */