diff mbox series

[v2] monitor/intel: Add decoding of PPAG Enable command

Message ID 20230818044542.532700-1-lokendra.singh@intel.com
State New
Headers show
Series [v2] monitor/intel: Add decoding of PPAG Enable command | expand

Commit Message

Singh, Lokendra Aug. 18, 2023, 4:45 a.m. UTC
Add decoding support for Intel PPAG Enable
command.

btmon log:
< HCI Command: Intel PPAG Enable (0x3f|0x020b) plen 4
        Enable: 0x00000002 (China)
> HCI Event: Command Complete (0x0e) plen 4
      Intel PPAG Enable (0x3f|0x020b) ncmd 1
        Status: Success (0x00)

Signed-off-by: Lokendra Singh <lokendra.singh@intel.com>
---
 monitor/intel.c | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com Aug. 18, 2023, 6:20 a.m. UTC | #1
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=777282

---Test result---

Test Summary:
CheckPatch                    PASS      0.38 seconds
GitLint                       PASS      0.25 seconds
BuildEll                      PASS      31.66 seconds
BluezMake                     PASS      972.48 seconds
MakeCheck                     PASS      12.98 seconds
MakeDistcheck                 PASS      179.92 seconds
CheckValgrind                 PASS      295.03 seconds
CheckSmatch                   PASS      392.40 seconds
bluezmakeextell               PASS      119.40 seconds
IncrementalBuild              PASS      792.17 seconds
ScanBuild                     PASS      1209.03 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Aug. 21, 2023, 10:30 p.m. UTC | #2
Hello:

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

On Fri, 18 Aug 2023 10:15:43 +0530 you wrote:
> Add decoding support for Intel PPAG Enable
> command.
> 
> btmon log:
> < HCI Command: Intel PPAG Enable (0x3f|0x020b) plen 4
>         Enable: 0x00000002 (China)
> > HCI Event: Command Complete (0x0e) plen 4
>       Intel PPAG Enable (0x3f|0x020b) ncmd 1
>         Status: Success (0x00)
> 
> [...]

Here is the summary with links:
  - [v2] monitor/intel: Add decoding of PPAG Enable command
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=c01cf4552c12

You are awesome, thank you!
diff mbox series

Patch

diff --git a/monitor/intel.c b/monitor/intel.c
index bdb95b7a79c0..0191987d45fb 100644
--- a/monitor/intel.c
+++ b/monitor/intel.c
@@ -712,6 +712,29 @@  static void read_supported_features_rsp(uint16_t index, const void *data,
 	packet_hexdump(data + 3, size - 3);
 }
 
+static void ppag_enable(uint16_t index, const void *data, uint8_t size)
+{
+	uint32_t enable = get_le32(data);
+	char *ppag_enable_flags;
+
+	switch (enable) {
+	case 0x01:
+		ppag_enable_flags = "EU";
+		break;
+	case 0x02:
+		ppag_enable_flags = "China";
+		break;
+	case 0x03:
+		ppag_enable_flags = "EU and China";
+		break;
+	default:
+		ppag_enable_flags = "Unknown";
+		break;
+	}
+
+	print_field("Enable: %s (0x%8.8x)", ppag_enable_flags, enable);
+}
+
 static const struct vendor_ocf vendor_ocf_table[] = {
 	{ 0x001, "Reset",
 			reset_cmd, 8, true,
@@ -777,7 +800,9 @@  static const struct vendor_ocf vendor_ocf_table[] = {
 	{ 0x0a6, "Read Supported Features",
 			read_supported_features_cmd, 1, true,
 			read_supported_features_rsp, 19, true },
-
+	{ 0x20b, "PPAG Enable",
+			ppag_enable, 4, true,
+			status_rsp, 1, true },
 	{ }
 };