Skip to contentSkip to conversation

doc: document AKMSuite diagnostic value

PATCH Superseded James Prestwood 1 participant 4 messages Mar 24, 2021

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 doc: document AKMSuite diagnostic value

---
 doc/station-diagnostic-api.txt | 2 ++
 1 file changed, 2 insertions(+)
doc/station-diagnostic-api.txt +2 -0
index b5a73b5d..6470fa56 100644
@@ -23,6 +23,8 @@ Methods		dict GetDiagnostics()
 
 			Frequency - Frequency of currently connected BSS.
 
+			AKMSuite - The chosen AKM for the current connection.
+
 			RSSI [optional] - The RSSI of the currently connected BSS.
 
 			AverageRSSI [optional] - Average RSSI of currently connected BSS.
Signature · 1 line
2.26.2
#1 lore raw

PATCH 2/4 ie: add ie_akm_suite_to_string

Converts ie_rsn_akm_suite values into strings

---
 src/ie.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 src/ie.h |  2 ++
 2 files changed, 48 insertions(+)
src/ie.c +46 -0
index 46f7496e..b265b811 100644
@@ -2636,3 +2636,49 @@ int ie_build_hs20_indication(uint8_t version, uint8_t *to)
 
 	return 0;
 }
+
+const char *ie_akm_suite_to_string(enum ie_rsn_akm_suite akm)
+{
+	switch (akm) {
+	case IE_RSN_AKM_SUITE_8021X:
+		return "802.1x";
+	case IE_RSN_AKM_SUITE_PSK:
+		return "PSK";
+	case IE_RSN_AKM_SUITE_FT_OVER_8021X:
+		return "FT-802.1x";
+	case IE_RSN_AKM_SUITE_FT_USING_PSK:
+		return "FT-PSK";
+	case IE_RSN_AKM_SUITE_8021X_SHA256:
+		return "802.1x-SHA256";
+	case IE_RSN_AKM_SUITE_PSK_SHA256:
+		return "PSK-SHA256";
+	case IE_RSN_AKM_SUITE_TDLS:
+		return "TDLS";
+	case IE_RSN_AKM_SUITE_SAE_SHA256:
+		return "SAE";
+	case IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256:
+		return "FT-SAE";
+	case IE_RSN_AKM_SUITE_AP_PEER_KEY_SHA256:
+		return "AP-PEER-KEY";
+	case IE_RSN_AKM_SUITE_8021X_SUITE_B_SHA256:
+		return "802.1x-Suite-B";
+	case IE_RSN_AKM_SUITE_8021X_SUITE_B_SHA384:
+		return "802.1x-Suite-B-SHA384";
+	case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
+		return "FT-802.1x-SHA384";
+	case IE_RSN_AKM_SUITE_OWE:
+		return "OWE";
+	case IE_RSN_AKM_SUITE_FILS_SHA256:
+		return "FILS-SHA256";
+	case IE_RSN_AKM_SUITE_FILS_SHA384:
+		return "FILS-SHA256";
+	case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256:
+		return "FT-FILS-SHA256";
+	case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384:
+		return "FT-FILS-SHA384";
+	case IE_RSN_AKM_SUITE_OSEN:
+		return "OSEN";
+	}
+
+	return NULL;
+}
src/ie.h +2 -0
index 995f0e4f..bed88de9 100644
@@ -528,3 +528,5 @@ int ie_parse_hs20_indication_from_data(const uint8_t *data, size_t len,
 					uint8_t *version, uint16_t *pps_mo_id,
 					uint8_t *domain_id);
 int ie_build_hs20_indication(uint8_t version, uint8_t *to);
+
+const char *ie_akm_suite_to_string(enum ie_rsn_akm_suite suite);
Signature · 1 line
2.26.2
#2 lore raw

PATCH 3/4 station: add AKMSuite to GetDiagnostics

In reply to James Prestwood
---
 src/station.c | 3 +++
 1 file changed, 3 insertions(+)
src/station.c +3 -0
index 8049fd85..2289ab39 100644
@@ -3629,6 +3629,7 @@ static void station_get_diagnostic_cb(
 	struct station *station = user_data;
 	struct l_dbus_message *reply;
 	struct l_dbus_message_builder *builder;
+	struct handshake_state *hs = netdev_get_handshake(station->netdev);
 
 	if (!info) {
 		reply = dbus_error_aborted(station->get_station_pending);
@@ -3645,6 +3646,8 @@ static void station_get_diagnostic_cb(
 					util_address_to_string(info->addr));
 	dbus_append_dict_basic(builder, "Frequency", 'u',
 				&station->connected_bss->frequency);
+	dbus_append_dict_basic(builder, "AKMSuite", 's',
+				ie_akm_suite_to_string(hs->akm_suite));
 
 	diagnostic_info_to_dict(info, builder);
 
Signature · 1 line
2.26.2
#3 lore raw

PATCH 4/4 client: add AKMSuite to diagnostics

In reply to James Prestwood
---
 client/diagnostic.c | 1 +
 1 file changed, 1 insertion(+)
client/diagnostic.c +1 -0
index 58c646d7..d5ff7738 100644
@@ -92,6 +92,7 @@ static const struct diagnostic_dict_mapping diagnostic_mapping[] = {
 	{ "RxMCS", 'y' },
 	{ "TxMCS", 'y' },
 	{ "Frequency", 'u' },
+	{ "AKMSuite", 's' },
 	{ NULL }
 };
 
Signature · 1 line
2.26.2