Skip to contentSkip to conversation

btmon/TDS: decode org 0x02 as Wi-Fi Alliance

PATCH In review Preston Hunt 3 participants 4 messages May 9 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

cover btmon/TDS: decode org 0x02 as Wi-Fi Alliance

Adding support to show Wi-Fi Alliance when decoding TDS frames in btmon. AFAIK, this code has been assigned to WFA.

Preston Hunt (1):
btmon: decode 0x02 as Wi-Fi Alliance

 monitor/packet.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
Signature · 1 line
2.51.2
#1 lore raw

PATCH 1/1 btmon: decode 0x02 as Wi-Fi Alliance

---
 monitor/packet.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
monitor/packet.c +14 -2
index a0bf7a709..9439a74c5 100644
@@ -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);
 
Signature · 1 line
2.51.2
#2 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1091848

---Test result---

Test Summary:

CheckPatch                    PASS      0.34 seconds
GitLint                       PASS      0.26 seconds
BuildEll                      PASS      20.23 seconds
BluezMake                     PASS      643.92 seconds
MakeCheck                     PASS      0.89 seconds
MakeDistcheck                 PASS      246.11 seconds
CheckValgrind                 PASS      218.86 seconds
CheckSmatch                   WARNING   346.88 seconds
bluezmakeextell               PASS      181.91 seconds
IncrementalBuild              PASS      639.76 seconds
ScanBuild                     PASS      1013.45 seconds

Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
monitor/packet.c:2000:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3909:52: warning: array of flexible structuresmonitor/bt.h:3897:40: warning: array of flexible structures

https://github.com/bluez/bluez/pull/2113

---
Regards,
Linux Bluetooth

#3 lore raw
In reply to Preston Hunt

Dear Preston,

Thank you for the patch.

Am 09.05.26 um 02:22 schrieb Preston Hunt:

Quoted 2 lines

Adding support to show Wi-Fi Alliance when decoding TDS frames in btmon. AFAIK, this code has been assigned to WFA.

I’d add this to the commit message, and maybe even document the test setup.

Kind regards,

Paul