diff mbox series

[v1] monitor/intel: Add decoding of PPAG command

Message ID 20230206063705.19909-1-kiran.k@intel.com (mailing list archive)
State Superseded
Headers show
Series [v1] monitor/intel: Add decoding of PPAG command | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch warning WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #69: < HCI Command: Intel Configure Per Platform Antenna Gain (0x3f|0x0219) plen 12 /github/workspace/src/src/13129347.patch total: 0 errors, 1 warnings, 43 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/src/13129347.patch has style problems, please review. NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Kiran K Feb. 6, 2023, 6:37 a.m. UTC
Add decoding support for Intel Per Platform
Antenna Gain command.

btmon logs:
< HCI Command: Intel Configure Per Platform Antenna Gain (0x3f|0x0219) plen 12
        Mcc: 0x00000000
        Selector: Enable
        Delta: 0x00000000
> HCI Event: Command Complete (0x0e) plen 4
      Intel Configure Per Platform Antenna Gain (0x3f|0x0219) ncmd 1
        Status: Success (0x00)
---
 monitor/intel.c | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com Feb. 6, 2023, 7:38 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=719007

---Test result---

Test Summary:
CheckPatch                    FAIL      1.00 seconds
GitLint                       PASS      0.37 seconds
BuildEll                      PASS      27.78 seconds
BluezMake                     PASS      846.14 seconds
MakeCheck                     PASS      11.32 seconds
MakeDistcheck                 PASS      148.07 seconds
CheckValgrind                 PASS      244.34 seconds
CheckSmatch                   PASS      324.17 seconds
bluezmakeextell               PASS      96.87 seconds
IncrementalBuild              PASS      690.35 seconds
ScanBuild                     PASS      997.41 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v1] monitor/intel: Add decoding of PPAG command
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#69: 
< HCI Command: Intel Configure Per Platform Antenna Gain (0x3f|0x0219) plen 12

/github/workspace/src/src/13129347.patch total: 0 errors, 1 warnings, 43 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13129347.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.




---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/monitor/intel.c b/monitor/intel.c
index f5e9f5932cf4..4a0f91a70182 100644
--- a/monitor/intel.c
+++ b/monitor/intel.c
@@ -712,6 +712,33 @@  static void read_supported_features_rsp(uint16_t index, const void *data,
 	packet_hexdump(data + 3, size - 3);
 }
 
+static void configure_ppag(uint16_t index, const void *data, uint8_t size)
+{
+	uint32_t mcc = get_le32(data);
+	uint32_t selector = get_le32(data + 4);
+	uint32_t delta = get_le32(data + 8);
+	char *ppag_selector;
+
+	switch (selector) {
+	case 0x00:
+		ppag_selector = "Enable";
+		break;
+	case 0x01:
+		ppag_selector = "Disable";
+		break;
+	case 0x02:
+		ppag_selector = "Test Mode";
+		break;
+	default:
+		ppag_selector = "Unknown";
+		break;
+	}
+
+	print_field("Mcc: 0x%8.8x", mcc);
+	print_field("Selector: %s", ppag_selector);
+	print_field("Delta: 0x%8.8x", delta);
+}
+
 static const struct vendor_ocf vendor_ocf_table[] = {
 	{ 0x001, "Reset",
 			reset_cmd, 8, true,
@@ -777,7 +804,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 },
-
+	{ 0x0219, "Configure Per Platform Antenna Gain",
+			configure_ppag, 12, true,
+			status_rsp, 1, true},
 	{ }
 };