Inteworking: Add support to update the ANQP 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:10 -05:00 committed by Jouni Malinen
parent 185ada4770
commit 5ce6ac11ab
4 changed files with 11 additions and 0 deletions

View file

@ -85,6 +85,7 @@ static struct wpa_bss_anqp * wpa_bss_anqp_clone(struct wpa_bss_anqp *anqp)
#define ANQP_DUP(f) if (anqp->f) n->f = wpabuf_dup(anqp->f) #define ANQP_DUP(f) if (anqp->f) n->f = wpabuf_dup(anqp->f)
#ifdef CONFIG_INTERWORKING #ifdef CONFIG_INTERWORKING
ANQP_DUP(capability_list);
ANQP_DUP(venue_name); ANQP_DUP(venue_name);
ANQP_DUP(network_auth_type); ANQP_DUP(network_auth_type);
ANQP_DUP(roaming_consortium); ANQP_DUP(roaming_consortium);
@ -155,6 +156,7 @@ static void wpa_bss_anqp_free(struct wpa_bss_anqp *anqp)
} }
#ifdef CONFIG_INTERWORKING #ifdef CONFIG_INTERWORKING
wpabuf_free(anqp->capability_list);
wpabuf_free(anqp->venue_name); wpabuf_free(anqp->venue_name);
wpabuf_free(anqp->network_auth_type); wpabuf_free(anqp->network_auth_type);
wpabuf_free(anqp->roaming_consortium); wpabuf_free(anqp->roaming_consortium);

View file

@ -26,6 +26,7 @@ struct wpa_bss_anqp {
/** Number of BSS entries referring to this ANQP data instance */ /** Number of BSS entries referring to this ANQP data instance */
unsigned int users; unsigned int users;
#ifdef CONFIG_INTERWORKING #ifdef CONFIG_INTERWORKING
struct wpabuf *capability_list;
struct wpabuf *venue_name; struct wpabuf *venue_name;
struct wpabuf *network_auth_type; struct wpabuf *network_auth_type;
struct wpabuf *roaming_consortium; struct wpabuf *roaming_consortium;

View file

@ -4176,6 +4176,8 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
#ifdef CONFIG_INTERWORKING #ifdef CONFIG_INTERWORKING
if ((mask & WPA_BSS_MASK_INTERNETW) && bss->anqp) { if ((mask & WPA_BSS_MASK_INTERNETW) && bss->anqp) {
struct wpa_bss_anqp *anqp = bss->anqp; struct wpa_bss_anqp *anqp = bss->anqp;
pos = anqp_add_hex(pos, end, "anqp_capability_list",
anqp->capability_list);
pos = anqp_add_hex(pos, end, "anqp_venue_name", pos = anqp_add_hex(pos, end, "anqp_venue_name",
anqp->venue_name); anqp->venue_name);
pos = anqp_add_hex(pos, end, "anqp_network_auth_type", pos = anqp_add_hex(pos, end, "anqp_network_auth_type",

View file

@ -2728,6 +2728,12 @@ static void interworking_parse_rx_anqp_resp(struct wpa_supplicant *wpa_s,
case ANQP_CAPABILITY_LIST: case ANQP_CAPABILITY_LIST:
wpa_msg(wpa_s, MSG_INFO, "RX-ANQP " MACSTR wpa_msg(wpa_s, MSG_INFO, "RX-ANQP " MACSTR
" ANQP Capability list", MAC2STR(sa)); " ANQP Capability list", MAC2STR(sa));
wpa_hexdump_ascii(MSG_DEBUG, "ANQP: Capability list",
pos, slen);
if (anqp) {
wpabuf_free(anqp->capability_list);
anqp->capability_list = wpabuf_alloc_copy(pos, slen);
}
break; break;
case ANQP_VENUE_NAME: case ANQP_VENUE_NAME:
wpa_msg(wpa_s, MSG_INFO, "RX-ANQP " MACSTR wpa_msg(wpa_s, MSG_INFO, "RX-ANQP " MACSTR