Linux bluetooth development
 help / color / mirror / Atom feed
From: Preston Hunt <me@prestonhunt.com>
To: linux-bluetooth@vger.kernel.org
Cc: Preston Hunt <me@prestonhunt.com>
Subject: [PATCH BlueZ 1/1] btmon: decode 0x02 as Wi-Fi Alliance
Date: Fri,  8 May 2026 17:22:49 -0700	[thread overview]
Message-ID: <20260509002249.2771777-2-me@prestonhunt.com> (raw)
In-Reply-To: <20260509002249.2771777-1-me@prestonhunt.com>

---
 monitor/packet.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/monitor/packet.c b/monitor/packet.c
index a0bf7a709..9439a74c5 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -4009,6 +4009,18 @@ static void print_mesh_data(const uint8_t *data, uint8_t len)
 	packet_hexdump(data + 1, len - 1);
 }
 
+static char *get_org_label(uint8_t org)
+{
+	switch (org) {
+	case 0x01:
+		return "Bluetooth SIG";
+	case 0x02:
+		return "Wi-Fi Alliance";
+	default:
+		return "RFU";
+	}
+}
+
 static void print_transport_data(const uint8_t *data, uint8_t len)
 {
 	print_field("Transport Discovery Data");
@@ -4016,8 +4028,8 @@ static void print_transport_data(const uint8_t *data, uint8_t len)
 	if (len < 3)
 		return;
 
-	print_field("  Organization: %s (0x%02x)",
-			data[0] == 0x01 ? "Bluetooth SIG" : "RFU", data[0]);
+	print_field("  Organization: %s (0x%02x)", get_org_label(data[0]),
+			data[0]);
 	print_field("  Flags: 0x%2.2x", data[1]);
 	print_field("    Role: 0x%2.2x", data[1] & 0x03);
 
-- 
2.51.2


  reply	other threads:[~2026-05-09  0:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-09  0:22 [PATCH BlueZ 0/1] btmon/TDS: decode org 0x02 as Wi-Fi Alliance Preston Hunt
2026-05-09  0:22 ` Preston Hunt [this message]
2026-05-09  2:14   ` bluez.test.bot
2026-05-09  9:08 ` [PATCH BlueZ 0/1] " Paul Menzel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260509002249.2771777-2-me@prestonhunt.com \
    --to=me@prestonhunt.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox