[PATCH 1/7] HS 2.0: Add support to update the HS20 Capability List into the BSS.

Ilan Peer ilan.peer at intel.com
Tue Feb 17 21:35:09 EST 2015


From: ASHUTOSH NARAYAN <ashutoshx.narayan at intel.com>

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

Signed-off-by: ASHUTOSH NARAYAN <ashutoshx.narayan at intel.com>
---
 wpa_supplicant/bss.c             | 2 ++
 wpa_supplicant/bss.h             | 1 +
 wpa_supplicant/ctrl_iface.c      | 2 ++
 wpa_supplicant/hs20_supplicant.c | 5 +++++
 4 files changed, 10 insertions(+)

diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
index 1798439..e7d8759 100644
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -95,6 +95,7 @@ static struct wpa_bss_anqp * wpa_bss_anqp_clone(struct wpa_bss_anqp *anqp)
 #endif /* CONFIG_INTERWORKING */
 #ifdef CONFIG_HS20
 	ANQP_DUP(hs20_operator_friendly_name);
+	ANQP_DUP(hs20_capability_list);
 	ANQP_DUP(hs20_wan_metrics);
 	ANQP_DUP(hs20_connection_capability);
 	ANQP_DUP(hs20_operating_class);
@@ -165,6 +166,7 @@ static void wpa_bss_anqp_free(struct wpa_bss_anqp *anqp)
 #ifdef CONFIG_HS20
 	wpabuf_free(anqp->hs20_operator_friendly_name);
 	wpabuf_free(anqp->hs20_wan_metrics);
+	wpabuf_free(anqp->hs20_capability_list);
 	wpabuf_free(anqp->hs20_connection_capability);
 	wpabuf_free(anqp->hs20_operating_class);
 	wpabuf_free(anqp->hs20_osu_providers_list);
diff --git a/wpa_supplicant/bss.h b/wpa_supplicant/bss.h
index 4a624c5..d8c172d 100644
--- a/wpa_supplicant/bss.h
+++ b/wpa_supplicant/bss.h
@@ -37,6 +37,7 @@ struct wpa_bss_anqp {
 #ifdef CONFIG_HS20
 	struct wpabuf *hs20_operator_friendly_name;
 	struct wpabuf *hs20_wan_metrics;
+	struct wpabuf *hs20_capability_list;
 	struct wpabuf *hs20_connection_capability;
 	struct wpabuf *hs20_operating_class;
 	struct wpabuf *hs20_osu_providers_list;
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index bbc6bd6..75deb6b 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -4192,6 +4192,8 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
 #ifdef CONFIG_HS20
 		pos = anqp_add_hex(pos, end, "hs20_operator_friendly_name",
 				   anqp->hs20_operator_friendly_name);
+		pos = anqp_add_hex(pos, end, "hs20_capability_list",
+				   anqp->hs20_capability_list);
 		pos = anqp_add_hex(pos, end, "hs20_wan_metrics",
 				   anqp->hs20_wan_metrics);
 		pos = anqp_add_hex(pos, end, "hs20_connection_capability",
diff --git a/wpa_supplicant/hs20_supplicant.c b/wpa_supplicant/hs20_supplicant.c
index eb18ed2..b9cd681 100644
--- a/wpa_supplicant/hs20_supplicant.c
+++ b/wpa_supplicant/hs20_supplicant.c
@@ -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
 			" HS Capability List", MAC2STR(sa));
 		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;
 	case HS20_STYPE_OPERATOR_FRIENDLY_NAME:
 		wpa_msg(wpa_s, MSG_INFO, "RX-HS20-ANQP " MACSTR
-- 
1.8.3.2



More information about the HostAP mailing list