Skip to contentSkip to conversation

iw: scan: Add printing of EHT Operation Element

PATCH New Aleksander Jan Bajkowski 1 participant 1 message May 2, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iw: scan: Add printing of EHT Operation Element

Add ability to print out EHT capabilities from AP beacons.

---
 ieee80211.h |  1 +
 iw.h        |  1 +
 scan.c      |  8 +++++++
 util.c      | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 72 insertions(+)
ieee80211.h +1 -0
index 1e29371..c31041e 100644
@@ -99,6 +99,7 @@ enum elem_id {
 enum elem_id_ext {
 	EID_EXT_HE_CAPABILITY		= 35,
 	EID_EXT_HE_OPERATION		= 36,
+	EID_EXT_EHT_OPERATION		= 106,
 	EID_EXT_EHT_CAPABILITY		= 108,
 };
 
iw.h +1 -0
index b8caccd..a423431 100644
@@ -247,6 +247,7 @@ void print_he_operation(const uint8_t *ie, int len);
 void print_he_info(struct nlattr *nl_iftype);
 void print_eht_capability(const uint8_t *ie, int len, const uint8_t *he_cap,
 			  bool from_ap);
+void print_eht_operation(const uint8_t *ie, int len);
 void print_eht_info(struct nlattr *nl_iftype, int band);
 void print_s1g_capability(const uint8_t *caps);
 
scan.c +8 -0
index 748ead1..263d2e3 100644
@@ -2426,10 +2426,18 @@ static void print_eht_capa(const uint8_t type, uint8_t len,
 	print_eht_capability(data, len, ctx->he_cap, ctx->from_ap);
 }
 
+static void print_eht_oper(const uint8_t type, uint8_t len, const uint8_t *data,
+			   const struct ie_context *ctx)
+{
+	printf("\n");
+	print_eht_operation(data, len);
+}
+
 static const struct ie_print ext_printers[] = {
 	[EID_EXT_HE_CAPABILITY] = { "HE capabilities", print_he_capa, 21, 54, BIT(PRINT_SCAN), },
 	[EID_EXT_HE_OPERATION] = { "HE Operation", print_he_oper, 6, 15, BIT(PRINT_SCAN), },
 	[EID_EXT_EHT_CAPABILITY] = { "EHT capabilities", print_eht_capa, 13, 30, BIT(PRINT_SCAN), },
+	[EID_EXT_EHT_OPERATION] = { "EHT Operation", print_eht_oper, 5, 10, BIT(PRINT_SCAN), },
 };
 
 static void print_extension(unsigned char len, unsigned char *ie,
util.c +62 -0

68 lines not on this page · raw message

Signature · 1 line
2.39.5