HS 2.0R2: Add OSU Providers list ANQP element
wpa_supplicant can now request OSU Providers list with "hs20_anqp_get <BSSID> 8". Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
184e110caf
commit
1d2215fc67
6 changed files with 19 additions and 1 deletions
|
@ -908,6 +908,7 @@ enum {
|
|||
#define HS20_STYPE_CONNECTION_CAPABILITY 5
|
||||
#define HS20_STYPE_NAI_HOME_REALM_QUERY 6
|
||||
#define HS20_STYPE_OPERATING_CLASS 7
|
||||
#define HS20_STYPE_OSU_PROVIDERS_LIST 8
|
||||
#define HS20_STYPE_ICON_REQUEST 10
|
||||
#define HS20_STYPE_ICON_BINARY_FILE 11
|
||||
|
||||
|
|
|
@ -98,6 +98,7 @@ static struct wpa_bss_anqp * wpa_bss_anqp_clone(struct wpa_bss_anqp *anqp)
|
|||
ANQP_DUP(hs20_wan_metrics);
|
||||
ANQP_DUP(hs20_connection_capability);
|
||||
ANQP_DUP(hs20_operating_class);
|
||||
ANQP_DUP(hs20_osu_providers_list);
|
||||
#endif /* CONFIG_HS20 */
|
||||
#undef ANQP_DUP
|
||||
|
||||
|
@ -166,6 +167,7 @@ static void wpa_bss_anqp_free(struct wpa_bss_anqp *anqp)
|
|||
wpabuf_free(anqp->hs20_wan_metrics);
|
||||
wpabuf_free(anqp->hs20_connection_capability);
|
||||
wpabuf_free(anqp->hs20_operating_class);
|
||||
wpabuf_free(anqp->hs20_osu_providers_list);
|
||||
#endif /* CONFIG_HS20 */
|
||||
|
||||
os_free(anqp);
|
||||
|
|
|
@ -39,6 +39,7 @@ struct wpa_bss_anqp {
|
|||
struct wpabuf *hs20_wan_metrics;
|
||||
struct wpabuf *hs20_connection_capability;
|
||||
struct wpabuf *hs20_operating_class;
|
||||
struct wpabuf *hs20_osu_providers_list;
|
||||
#endif /* CONFIG_HS20 */
|
||||
};
|
||||
|
||||
|
|
|
@ -3527,6 +3527,10 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
|||
anqp->hs20_wan_metrics);
|
||||
pos = anqp_add_hex(pos, end, "hs20_connection_capability",
|
||||
anqp->hs20_connection_capability);
|
||||
pos = anqp_add_hex(pos, end, "hs20_operating_class",
|
||||
anqp->hs20_operating_class);
|
||||
pos = anqp_add_hex(pos, end, "hs20_osu_providers_list",
|
||||
anqp->hs20_osu_providers_list);
|
||||
#endif /* CONFIG_HS20 */
|
||||
}
|
||||
#endif /* CONFIG_INTERWORKING */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2009, Atheros Communications, Inc.
|
||||
* Copyright (c) 2011-2012, Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2011-2013, Qualcomm Atheros, Inc.
|
||||
*
|
||||
* This software may be distributed under the terms of the BSD license.
|
||||
* See README for more details.
|
||||
|
@ -238,6 +238,15 @@ void hs20_parse_rx_hs20_anqp_resp(struct wpa_supplicant *wpa_s,
|
|||
wpabuf_alloc_copy(pos, slen);
|
||||
}
|
||||
break;
|
||||
case HS20_STYPE_OSU_PROVIDERS_LIST:
|
||||
wpa_msg(wpa_s, MSG_INFO, "RX-HS20-ANQP " MACSTR
|
||||
" OSU Providers list", MAC2STR(sa));
|
||||
if (anqp) {
|
||||
wpabuf_free(anqp->hs20_osu_providers_list);
|
||||
anqp->hs20_osu_providers_list =
|
||||
wpabuf_alloc_copy(pos, slen);
|
||||
}
|
||||
break;
|
||||
case HS20_STYPE_ICON_BINARY_FILE:
|
||||
wpa_msg(wpa_s, MSG_INFO, "RX-HS20-ANQP " MACSTR
|
||||
" Icon Binary File", MAC2STR(sa));
|
||||
|
|
|
@ -234,6 +234,7 @@ static int interworking_anqp_send_req(struct wpa_supplicant *wpa_s,
|
|||
wpabuf_put_u8(extra, HS20_STYPE_WAN_METRICS);
|
||||
wpabuf_put_u8(extra, HS20_STYPE_CONNECTION_CAPABILITY);
|
||||
wpabuf_put_u8(extra, HS20_STYPE_OPERATING_CLASS);
|
||||
wpabuf_put_u8(extra, HS20_STYPE_OSU_PROVIDERS_LIST);
|
||||
}
|
||||
gas_anqp_set_element_len(extra, len_pos);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue