linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ v1 1/2] monitor: Add page information to print_features_subpage
@ 2025-11-13 15:58 Luiz Augusto von Dentz
  2025-11-13 15:58 ` [PATCH BlueZ v1 2/2] btdev: Fix set_bredrle_commands Luiz Augusto von Dentz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2025-11-13 15:58 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This makes print_features_subpage print the page they belong:

> HCI Event: Command Complete (0x0e) plen 253
      LE Read All Local Features (0x08|0x0087) ncmd 1
        Status: Success (0x00)
        Page: 10
        Features[0/0][8]: 403900f301000080
          LL Privacy
          LE 2M PHY
          LE Coded PHY
          LE Extended Advertising
          LE Periodic Advertising
          Periodic Advertising Sync Transfer - Sender
          Periodic Advertising Sync Transfer - Recipient
          Connected Isochronous Stream - Central
          Connected Isochronous Stream - Peripheral
          Isochronous Broadcaster
          Synchronized Receiver
          Connected Isochronous Stream (Host Support)
          LL Extended Feature Set
        Features[1/0][8]: 0000000000000000
        Features[1/1][8]: 0000000000000000
        Features[1/2][8]: 0000000000000000
        Features[2/0][8]: 0000000000000000
        Features[2/1][8]: 0000000000000000
        Features[2/2][8]: 0000000000000000
        Features[3/0][8]: 0000000000000000
        Features[3/1][8]: 0000000000000000
        Features[3/2][8]: 0000000000000000
        Features[4/0][8]: 0000000000000000
        Features[4/1][8]: 0000000000000000
        Features[4/2][8]: 0000000000000000
        Features[5/0][8]: 0000000000000000
        Features[5/1][8]: 0000000000000000
        Features[5/2][8]: 0000000000000000
        Features[6/0][8]: 0000000000000000
        Features[6/1][8]: 0000000000000000
        Features[6/2][8]: 0000000000000000
        Features[7/0][8]: 0000000000000000
        Features[7/1][8]: 0000000000000000
        Features[7/2][8]: 0000000000000000
        Features[8/0][8]: 0000000000000000
        Features[8/1][8]: 0000000000000000
        Features[8/2][8]: 0000000000000000
        Features[9/0][8]: 0000000000000000
        Features[9/1][8]: 0000000000000000
        Features[9/2][8]: 0000000000000000
        Features[10/0][8]: 0000000000000000
        Features[10/1][8]: 0000000000000000
        Features[10/2][8]: 0000000000000000
---
 monitor/packet.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/monitor/packet.c b/monitor/packet.c
index 06c0894d8a18..2ae4f8ffff74 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -2837,18 +2837,18 @@ static const struct bitfield_data features_msft[] = {
 	{ }
 };
 
-static void print_features_subpage(uint8_t subpages,
+static void print_features_subpage(uint8_t page, uint8_t subpages,
 					const uint8_t *features_array,
 					uint64_t *features)
 {
 	int i, j;
-	char str[16];
+	char str[18];
 
 	for (i = 0; i < subpages; i++) {
 		for (j = 0; j < 8; j++)
 			features[i] |= ((uint64_t) features_array[i * 8 + j])
 					<< (j * 8);
-		sprintf(str, "Features[%u]", i);
+		sprintf(str, "Features[%u/%u]", page, i);
 		print_hex_field(str, &features_array[i * 8], 8);
 	}
 }
@@ -2865,7 +2865,7 @@ static void print_features(uint8_t page, const uint8_t *features_array,
 	if (type == 0x01 && page)
 		subpages = 3;
 
-	print_features_subpage(subpages, features_array, features);
+	print_features_subpage(page, subpages, features_array, features);
 
 	switch (type) {
 	case 0x00:
-- 
2.51.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-11-14 17:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-13 15:58 [PATCH BlueZ v1 1/2] monitor: Add page information to print_features_subpage Luiz Augusto von Dentz
2025-11-13 15:58 ` [PATCH BlueZ v1 2/2] btdev: Fix set_bredrle_commands Luiz Augusto von Dentz
2025-11-13 17:31 ` [BlueZ,v1,1/2] monitor: Add page information to print_features_subpage bluez.test.bot
2025-11-14 17:12 ` [PATCH BlueZ v1 1/2] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).