* [PATCH v3] Bluetooth: btintel: Send new command for PPAG
@ 2023-08-17 11:42 Lokendra Singh
2023-08-17 12:43 ` [v3] " bluez.test.bot
2023-08-22 19:20 ` [PATCH v3] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Lokendra Singh @ 2023-08-17 11:42 UTC (permalink / raw)
To: linux-bluetooth
Cc: ravishankar.srivatsa, chethan.tumkur.narayan, luiz.von.dentz,
tedd.an, kiran.k, Lokendra Singh, Seema Sreemantha
Added support for the new command opcode FE0B
(HCI Intel PPAG Enable).
btmon log:
< HCI Command: Intel PPAG Enable (0x3f|0x020b) plen 4
Enable: 0x00000002
> HCI Event: Command Complete (0x0e) plen 4
Intel PPAG Enable (0x3f|0x020b) ncmd 1
Status: Success (0x00)
Signed-off-by: Seema Sreemantha <seema.sreemantha@intel.com>
Signed-off-by: Lokendra Singh <lokendra.singh@intel.com>
---
drivers/bluetooth/btintel.c | 25 ++++++++++++++++---------
drivers/bluetooth/btintel.h | 7 +++----
2 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 633e8d9bf58f..9b239ce96fa4 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -2401,7 +2401,7 @@ static void btintel_set_ppag(struct hci_dev *hdev, struct intel_version_tlv *ver
{
struct btintel_ppag ppag;
struct sk_buff *skb;
- struct btintel_loc_aware_reg ppag_cmd;
+ struct hci_ppag_enable_cmd ppag_cmd;
acpi_handle handle;
/* PPAG is not supported if CRF is HrP2, Jfp2, JfP1 */
@@ -2409,6 +2409,8 @@ static void btintel_set_ppag(struct hci_dev *hdev, struct intel_version_tlv *ver
case 0x504: /* Hrp2 */
case 0x202: /* Jfp2 */
case 0x201: /* Jfp1 */
+ bt_dev_dbg(hdev, "PPAG not supported for Intel CNVr (0x%3x)",
+ ver->cnvr_top & 0xFFF);
return;
}
@@ -2434,24 +2436,29 @@ static void btintel_set_ppag(struct hci_dev *hdev, struct intel_version_tlv *ver
}
if (ppag.domain != 0x12) {
- bt_dev_warn(hdev, "PPAG-BT: domain is not bluetooth");
+ bt_dev_dbg(hdev, "PPAG-BT: Bluetooth domain is disabled in ACPI firmware");
return;
}
- /* PPAG mode, BIT0 = 0 Disabled, BIT0 = 1 Enabled */
- if (!(ppag.mode & BIT(0))) {
- bt_dev_dbg(hdev, "PPAG-BT: disabled");
+ /* PPAG mode
+ * BIT 0 : 0 Disabled in EU
+ * 1 Enabled in EU
+ * BIT 1 : 0 Disabled in China
+ * 1 Enabled in China
+ */
+ if ((ppag.mode & 0x01) != BIT(0) && (ppag.mode & 0x02) != BIT(1)) {
+ bt_dev_dbg(hdev, "PPAG-BT: EU, China mode are disabled in CB/BIOS");
return;
}
- ppag_cmd.mcc = cpu_to_le32(0);
- ppag_cmd.sel = cpu_to_le32(0); /* 0 - Enable , 1 - Disable, 2 - Testing mode */
- ppag_cmd.delta = cpu_to_le32(0);
- skb = __hci_cmd_sync(hdev, 0xfe19, sizeof(ppag_cmd), &ppag_cmd, HCI_CMD_TIMEOUT);
+ ppag_cmd.ppag_enable_flags = cpu_to_le32(ppag.mode);
+
+ skb = __hci_cmd_sync(hdev, INTEL_OP_PPAG_CMD, sizeof(ppag_cmd), &ppag_cmd, HCI_CMD_TIMEOUT);
if (IS_ERR(skb)) {
bt_dev_warn(hdev, "Failed to send PPAG Enable (%ld)", PTR_ERR(skb));
return;
}
+ bt_dev_info(hdev, "PPAG-BT: Enabled (Mode %d)", ppag.mode);
kfree_skb(skb);
}
diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h
index 2ed646609dee..3a2d5b4219dd 100644
--- a/drivers/bluetooth/btintel.h
+++ b/drivers/bluetooth/btintel.h
@@ -137,10 +137,9 @@ struct intel_offload_use_cases {
__u8 preset[8];
} __packed;
-struct btintel_loc_aware_reg {
- __le32 mcc;
- __le32 sel;
- __le32 delta;
+#define INTEL_OP_PPAG_CMD 0xFE0B
+struct hci_ppag_enable_cmd {
+ __le32 ppag_enable_flags;
} __packed;
#define INTEL_TLV_TYPE_ID 0x01
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [v3] Bluetooth: btintel: Send new command for PPAG
2023-08-17 11:42 [PATCH v3] Bluetooth: btintel: Send new command for PPAG Lokendra Singh
@ 2023-08-17 12:43 ` bluez.test.bot
2023-08-22 19:20 ` [PATCH v3] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2023-08-17 12:43 UTC (permalink / raw)
To: linux-bluetooth, lokendra.singh
[-- Attachment #1: Type: text/plain, Size: 1427 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=776954
---Test result---
Test Summary:
CheckPatch PASS 0.82 seconds
GitLint PASS 0.29 seconds
SubjectPrefix PASS 0.10 seconds
BuildKernel PASS 33.09 seconds
CheckAllWarning PASS 36.40 seconds
CheckSparse PASS 40.87 seconds
CheckSmatch PASS 114.62 seconds
BuildKernel32 PASS 31.92 seconds
TestRunnerSetup PASS 490.73 seconds
TestRunner_l2cap-tester PASS 27.61 seconds
TestRunner_iso-tester PASS 48.87 seconds
TestRunner_bnep-tester PASS 10.89 seconds
TestRunner_mgmt-tester PASS 223.91 seconds
TestRunner_rfcomm-tester PASS 16.38 seconds
TestRunner_sco-tester PASS 19.49 seconds
TestRunner_ioctl-tester PASS 18.42 seconds
TestRunner_mesh-tester PASS 13.59 seconds
TestRunner_smp-tester PASS 14.64 seconds
TestRunner_userchan-tester PASS 11.41 seconds
IncrementalBuild PASS 32.62 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] Bluetooth: btintel: Send new command for PPAG
2023-08-17 11:42 [PATCH v3] Bluetooth: btintel: Send new command for PPAG Lokendra Singh
2023-08-17 12:43 ` [v3] " bluez.test.bot
@ 2023-08-22 19:20 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2023-08-22 19:20 UTC (permalink / raw)
To: Lokendra Singh
Cc: linux-bluetooth, ravishankar.srivatsa, chethan.tumkur.narayan,
luiz.von.dentz, tedd.an, kiran.k, seema.sreemantha
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Thu, 17 Aug 2023 17:12:50 +0530 you wrote:
> Added support for the new command opcode FE0B
> (HCI Intel PPAG Enable).
>
> btmon log:
> < HCI Command: Intel PPAG Enable (0x3f|0x020b) plen 4
> Enable: 0x00000002
> > HCI Event: Command Complete (0x0e) plen 4
> Intel PPAG Enable (0x3f|0x020b) ncmd 1
> Status: Success (0x00)
>
> [...]
Here is the summary with links:
- [v3] Bluetooth: btintel: Send new command for PPAG
https://git.kernel.org/bluetooth/bluetooth-next/c/a0c33fb2c3b2
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-08-22 19:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17 11:42 [PATCH v3] Bluetooth: btintel: Send new command for PPAG Lokendra Singh
2023-08-17 12:43 ` [v3] " bluez.test.bot
2023-08-22 19:20 ` [PATCH v3] " patchwork-bot+bluetooth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.