HS 2.0: Add fetching of Operator Icon Metadata ANQP-element
This extends wpa_supplicant Hotspot 2.0 ANQP routines to allow the Operator Icon Metadata ANQP-element to be fetched with "ANQP_GET <bssid> hs20:12". The result is available in the new hs20_operator_icon_metadata entry in the "BSS <bssid>" output. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
37547ad63c
commit
6a8a04d742
5 changed files with 16 additions and 0 deletions
|
@ -1327,6 +1327,7 @@ enum wmm_ac {
|
|||
#define HS20_STYPE_OSU_PROVIDERS_LIST 8
|
||||
#define HS20_STYPE_ICON_REQUEST 10
|
||||
#define HS20_STYPE_ICON_BINARY_FILE 11
|
||||
#define HS20_STYPE_OPERATOR_ICON_METADATA 12
|
||||
|
||||
#define HS20_DGAF_DISABLED 0x01
|
||||
#define HS20_PPS_MO_ID_PRESENT 0x02
|
||||
|
|
|
@ -102,6 +102,7 @@ static struct wpa_bss_anqp * wpa_bss_anqp_clone(struct wpa_bss_anqp *anqp)
|
|||
ANQP_DUP(hs20_connection_capability);
|
||||
ANQP_DUP(hs20_operating_class);
|
||||
ANQP_DUP(hs20_osu_providers_list);
|
||||
ANQP_DUP(hs20_operator_icon_metadata);
|
||||
#endif /* CONFIG_HS20 */
|
||||
#undef ANQP_DUP
|
||||
|
||||
|
@ -185,6 +186,7 @@ static void wpa_bss_anqp_free(struct wpa_bss_anqp *anqp)
|
|||
wpabuf_free(anqp->hs20_connection_capability);
|
||||
wpabuf_free(anqp->hs20_operating_class);
|
||||
wpabuf_free(anqp->hs20_osu_providers_list);
|
||||
wpabuf_free(anqp->hs20_operator_icon_metadata);
|
||||
#endif /* CONFIG_HS20 */
|
||||
|
||||
os_free(anqp);
|
||||
|
|
|
@ -50,6 +50,7 @@ struct wpa_bss_anqp {
|
|||
struct wpabuf *hs20_connection_capability;
|
||||
struct wpabuf *hs20_operating_class;
|
||||
struct wpabuf *hs20_osu_providers_list;
|
||||
struct wpabuf *hs20_operator_icon_metadata;
|
||||
#endif /* CONFIG_HS20 */
|
||||
};
|
||||
|
||||
|
|
|
@ -4800,6 +4800,8 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
|||
anqp->hs20_operating_class);
|
||||
pos = anqp_add_hex(pos, end, "hs20_osu_providers_list",
|
||||
anqp->hs20_osu_providers_list);
|
||||
pos = anqp_add_hex(pos, end, "hs20_operator_icon_metadata",
|
||||
anqp->hs20_operator_icon_metadata);
|
||||
#endif /* CONFIG_HS20 */
|
||||
|
||||
dl_list_for_each(elem, &anqp->anqp_elems,
|
||||
|
|
|
@ -645,6 +645,16 @@ void hs20_parse_rx_hs20_anqp_resp(struct wpa_supplicant *wpa_s,
|
|||
wpa_s, NULL);
|
||||
}
|
||||
break;
|
||||
case HS20_STYPE_OPERATOR_ICON_METADATA:
|
||||
wpa_msg(wpa_s, MSG_INFO, RX_HS20_ANQP MACSTR
|
||||
" Operator Icon Metadata", MAC2STR(sa));
|
||||
wpa_hexdump(MSG_DEBUG, "Operator Icon Metadata", pos, slen);
|
||||
if (anqp) {
|
||||
wpabuf_free(anqp->hs20_operator_icon_metadata);
|
||||
anqp->hs20_operator_icon_metadata =
|
||||
wpabuf_alloc_copy(pos, slen);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
wpa_printf(MSG_DEBUG, "HS20: Unsupported subtype %u", subtype);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue