HS 2.0: Add support to update the HS20 Capability List into the BSS

In addition, add support for returning the capability list through the
BSS control interface command.

Signed-off-by: ASHUTOSH NARAYAN <ashutoshx.narayan@intel.com>
This commit is contained in:
ASHUTOSH NARAYAN 2015-02-17 21:35:09 -05:00 committed by Jouni Malinen
parent 7fe7a3a51f
commit 185ada4770
4 changed files with 10 additions and 0 deletions

View file

@ -94,6 +94,7 @@ static struct wpa_bss_anqp * wpa_bss_anqp_clone(struct wpa_bss_anqp *anqp)
ANQP_DUP(domain_name); ANQP_DUP(domain_name);
#endif /* CONFIG_INTERWORKING */ #endif /* CONFIG_INTERWORKING */
#ifdef CONFIG_HS20 #ifdef CONFIG_HS20
ANQP_DUP(hs20_capability_list);
ANQP_DUP(hs20_operator_friendly_name); ANQP_DUP(hs20_operator_friendly_name);
ANQP_DUP(hs20_wan_metrics); ANQP_DUP(hs20_wan_metrics);
ANQP_DUP(hs20_connection_capability); ANQP_DUP(hs20_connection_capability);
@ -163,6 +164,7 @@ static void wpa_bss_anqp_free(struct wpa_bss_anqp *anqp)
wpabuf_free(anqp->domain_name); wpabuf_free(anqp->domain_name);
#endif /* CONFIG_INTERWORKING */ #endif /* CONFIG_INTERWORKING */
#ifdef CONFIG_HS20 #ifdef CONFIG_HS20
wpabuf_free(anqp->hs20_capability_list);
wpabuf_free(anqp->hs20_operator_friendly_name); wpabuf_free(anqp->hs20_operator_friendly_name);
wpabuf_free(anqp->hs20_wan_metrics); wpabuf_free(anqp->hs20_wan_metrics);
wpabuf_free(anqp->hs20_connection_capability); wpabuf_free(anqp->hs20_connection_capability);

View file

@ -35,6 +35,7 @@ struct wpa_bss_anqp {
struct wpabuf *domain_name; struct wpabuf *domain_name;
#endif /* CONFIG_INTERWORKING */ #endif /* CONFIG_INTERWORKING */
#ifdef CONFIG_HS20 #ifdef CONFIG_HS20
struct wpabuf *hs20_capability_list;
struct wpabuf *hs20_operator_friendly_name; struct wpabuf *hs20_operator_friendly_name;
struct wpabuf *hs20_wan_metrics; struct wpabuf *hs20_wan_metrics;
struct wpabuf *hs20_connection_capability; struct wpabuf *hs20_connection_capability;

View file

@ -4190,6 +4190,8 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
pos = anqp_add_hex(pos, end, "anqp_domain_name", pos = anqp_add_hex(pos, end, "anqp_domain_name",
anqp->domain_name); anqp->domain_name);
#ifdef CONFIG_HS20 #ifdef CONFIG_HS20
pos = anqp_add_hex(pos, end, "hs20_capability_list",
anqp->hs20_capability_list);
pos = anqp_add_hex(pos, end, "hs20_operator_friendly_name", pos = anqp_add_hex(pos, end, "hs20_operator_friendly_name",
anqp->hs20_operator_friendly_name); anqp->hs20_operator_friendly_name);
pos = anqp_add_hex(pos, end, "hs20_wan_metrics", pos = anqp_add_hex(pos, end, "hs20_wan_metrics",

View file

@ -380,6 +380,11 @@ void hs20_parse_rx_hs20_anqp_resp(struct wpa_supplicant *wpa_s,
wpa_msg(wpa_s, MSG_INFO, "RX-HS20-ANQP " MACSTR wpa_msg(wpa_s, MSG_INFO, "RX-HS20-ANQP " MACSTR
" HS Capability List", MAC2STR(sa)); " HS Capability List", MAC2STR(sa));
wpa_hexdump_ascii(MSG_DEBUG, "HS Capability List", pos, slen); wpa_hexdump_ascii(MSG_DEBUG, "HS Capability List", pos, slen);
if (anqp) {
wpabuf_free(anqp->hs20_capability_list);
anqp->hs20_capability_list =
wpabuf_alloc_copy(pos, slen);
}
break; break;
case HS20_STYPE_OPERATOR_FRIENDLY_NAME: case HS20_STYPE_OPERATOR_FRIENDLY_NAME:
wpa_msg(wpa_s, MSG_INFO, "RX-HS20-ANQP " MACSTR wpa_msg(wpa_s, MSG_INFO, "RX-HS20-ANQP " MACSTR