All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/4] nlmon: print RSNXE
@ 2021-09-21 20:44 James Prestwood
  0 siblings, 0 replies; only message in thread
From: James Prestwood @ 2021-09-21 20:44 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]

---
 monitor/nlmon.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/monitor/nlmon.c b/monitor/nlmon.c
index ec7fc03a..5b96a24a 100644
--- a/monitor/nlmon.c
+++ b/monitor/nlmon.c
@@ -2259,6 +2259,23 @@ static void print_mobility_domain(unsigned int level, const char *label,
 		print_attr(level + 1, "Resource Request Protocol bit set");
 }
 
+static void print_rsnx(unsigned int level, const char *label,
+					const void *data, uint16_t size)
+{
+	const uint8_t *ptr = data;
+	uint8_t field_size = bit_field(ptr[0], 0, 4);
+
+	print_attr(level, "%s", label);
+
+	print_attr(level + 1, "Field Size: %u", field_size);
+
+	if (test_bit(ptr, 4))
+		print_attr(level + 1, "Protected TWT Operations Support");
+
+	if (test_bit(ptr, 5))
+		print_attr(level + 1, "SAE Hash-to-Element");
+}
+
 static struct attr_entry ie_entry[] = {
 	{ IE_TYPE_SSID,				"SSID",
 		ATTR_CUSTOM,	{ .function = print_ie_ssid } },
@@ -2321,6 +2338,8 @@ static struct attr_entry ie_entry[] = {
 		ATTR_CUSTOM,	{ .function = print_fast_bss_transition } },
 	{ IE_TYPE_MOBILITY_DOMAIN,		"Mobility Domain",
 		ATTR_CUSTOM,	{ .function = print_mobility_domain } },
+	{ IE_TYPE_RSNX,				"RSNX",
+		ATTR_CUSTOM,	{ .function = print_rsnx } },
 	{ },
 };
 
-- 
2.31.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-21 20:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 20:44 [PATCH 4/4] nlmon: print RSNXE James Prestwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.