linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ] monitor: Fix using PACKET_FILTER_SHOW_SCO_DATA for ISO packets
@ 2023-05-17 21:58 Luiz Augusto von Dentz
  2023-05-17 23:09 ` [BlueZ] " bluez.test.bot
  2023-05-18 19:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2023-05-17 21:58 UTC (permalink / raw)
  To: linux-bluetooth

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

This fixes the uses of PACKET_FILTER_SHOW_SCO_DATA for ISO packets and
introduce a dedicated flag for it in the form of
PACKET_FILTER_SHOW_ISO_DATA which can be enabled with use of -I/--iso.
---
 monitor/main.c   | 9 +++++++--
 monitor/packet.c | 5 +++--
 monitor/packet.h | 1 +
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/monitor/main.c b/monitor/main.c
index 3ec3a5f08a01..decf7cc467f2 100644
--- a/monitor/main.c
+++ b/monitor/main.c
@@ -62,6 +62,7 @@ static void usage(void)
 		"\t-T, --date             Show time and date information\n"
 		"\t-S, --sco              Dump SCO traffic\n"
 		"\t-A, --a2dp             Dump A2DP stream traffic\n"
+		"\t-I, --iso              Dump ISO traffic\n"
 		"\t-E, --ellisys [ip]     Send Ellisys HCI Injection\n"
 		"\t-P, --no-pager         Disable pager usage\n"
 		"\t-J  --jlink <device>,[<serialno>],[<interface>],[<speed>]\n"
@@ -89,6 +90,7 @@ static const struct option main_options[] = {
 	{ "date",      no_argument,       NULL, 'T' },
 	{ "sco",       no_argument,       NULL, 'S' },
 	{ "a2dp",      no_argument,       NULL, 'A' },
+	{ "iso",       no_argument,       NULL, 'I' },
 	{ "ellisys",   required_argument, NULL, 'E' },
 	{ "no-pager",  no_argument,       NULL, 'P' },
 	{ "jlink",     required_argument, NULL, 'J' },
@@ -126,8 +128,8 @@ int main(int argc, char *argv[])
 		struct sockaddr_un addr;
 
 		opt = getopt_long(argc, argv,
-					"r:w:a:s:p:i:d:B:V:MNtTSAE:PJ:R:C:c:vh",
-					main_options, NULL);
+				"r:w:a:s:p:i:d:B:V:MNtTSAIE:PJ:R:C:c:vh",
+				main_options, NULL);
 		if (opt < 0)
 			break;
 
@@ -197,6 +199,9 @@ int main(int argc, char *argv[])
 		case 'A':
 			filter_mask |= PACKET_FILTER_SHOW_A2DP_STREAM;
 			break;
+		case 'I':
+			filter_mask |= PACKET_FILTER_SHOW_ISO_DATA;
+			break;
 		case 'E':
 			ellisys_server = optarg;
 			ellisys_port = 24352;
diff --git a/monitor/packet.c b/monitor/packet.c
index 94561b65ea75..aafb81eefb13 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -66,6 +66,7 @@
 #define COLOR_HCI_EVENT_UNKNOWN		COLOR_WHITE_BG
 #define COLOR_HCI_ACLDATA		COLOR_CYAN
 #define COLOR_HCI_SCODATA		COLOR_YELLOW
+#define COLOR_HCI_ISODATA		COLOR_YELLOW
 
 #define COLOR_UNKNOWN_ERROR		COLOR_WHITE_BG
 #define COLOR_UNKNOWN_FEATURE_BIT	COLOR_WHITE_BG
@@ -12357,7 +12358,7 @@ void packet_hci_isodata(struct timeval *tv, struct ucred *cred, uint16_t index,
 	sprintf(handle_str, "Handle %d", acl_handle(handle));
 	sprintf(extra_str, "flags 0x%2.2x dlen %d", flags, hdr->dlen);
 
-	print_packet(tv, cred, in ? '>' : '<', index, NULL, COLOR_HCI_SCODATA,
+	print_packet(tv, cred, in ? '>' : '<', index, NULL, COLOR_HCI_ISODATA,
 				in ? "ISO Data RX" : "ISO Data TX",
 						handle_str, extra_str);
 
@@ -12368,7 +12369,7 @@ void packet_hci_isodata(struct timeval *tv, struct ucred *cred, uint16_t index,
 		return;
 	}
 
-	if (filter_mask & PACKET_FILTER_SHOW_SCO_DATA)
+	if (filter_mask & PACKET_FILTER_SHOW_ISO_DATA)
 		packet_hexdump(data, size);
 }
 
diff --git a/monitor/packet.h b/monitor/packet.h
index b07d5d18ce21..55ba854ec1f7 100644
--- a/monitor/packet.h
+++ b/monitor/packet.h
@@ -22,6 +22,7 @@
 #define PACKET_FILTER_SHOW_SCO_DATA	(1 << 5)
 #define PACKET_FILTER_SHOW_A2DP_STREAM	(1 << 6)
 #define PACKET_FILTER_SHOW_MGMT_SOCKET	(1 << 7)
+#define PACKET_FILTER_SHOW_ISO_DATA	(1 << 8)
 
 struct packet_conn_data {
 	uint16_t index;
-- 
2.40.1


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

* RE: [BlueZ] monitor: Fix using PACKET_FILTER_SHOW_SCO_DATA for ISO packets
  2023-05-17 21:58 [PATCH BlueZ] monitor: Fix using PACKET_FILTER_SHOW_SCO_DATA for ISO packets Luiz Augusto von Dentz
@ 2023-05-17 23:09 ` bluez.test.bot
  2023-05-18 19:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2023-05-17 23:09 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

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

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=748669

---Test result---

Test Summary:
CheckPatch                    PASS      0.45 seconds
GitLint                       PASS      0.30 seconds
BuildEll                      PASS      26.47 seconds
BluezMake                     PASS      791.91 seconds
MakeCheck                     PASS      11.49 seconds
MakeDistcheck                 PASS      155.08 seconds
CheckValgrind                 PASS      247.47 seconds
CheckSmatch                   WARNING   336.29 seconds
bluezmakeextell               PASS      101.00 seconds
IncrementalBuild              PASS      660.64 seconds
ScanBuild                     PASS      1013.03 seconds

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


---
Regards,
Linux Bluetooth


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

* Re: [PATCH BlueZ] monitor: Fix using PACKET_FILTER_SHOW_SCO_DATA for ISO packets
  2023-05-17 21:58 [PATCH BlueZ] monitor: Fix using PACKET_FILTER_SHOW_SCO_DATA for ISO packets Luiz Augusto von Dentz
  2023-05-17 23:09 ` [BlueZ] " bluez.test.bot
@ 2023-05-18 19:40 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2023-05-18 19:40 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 17 May 2023 14:58:52 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This fixes the uses of PACKET_FILTER_SHOW_SCO_DATA for ISO packets and
> introduce a dedicated flag for it in the form of
> PACKET_FILTER_SHOW_ISO_DATA which can be enabled with use of -I/--iso.
> ---
>  monitor/main.c   | 9 +++++++--
>  monitor/packet.c | 5 +++--
>  monitor/packet.h | 1 +
>  3 files changed, 11 insertions(+), 4 deletions(-)

Here is the summary with links:
  - [BlueZ] monitor: Fix using PACKET_FILTER_SHOW_SCO_DATA for ISO packets
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=9526ef46e465

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2023-05-18 19:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-17 21:58 [PATCH BlueZ] monitor: Fix using PACKET_FILTER_SHOW_SCO_DATA for ISO packets Luiz Augusto von Dentz
2023-05-17 23:09 ` [BlueZ] " bluez.test.bot
2023-05-18 19:40 ` [PATCH BlueZ] " 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).