[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210805180227.v6.2.Ifb35feb49ec588106b256c508259500583582125@changeid>
Date: Thu, 5 Aug 2021 18:02:58 +0800
From: Joseph Hwang <josephsih@...omium.org>
To: linux-bluetooth@...r.kernel.org, marcel@...tmann.org,
luiz.dentz@...il.com, pali@...nel.org
Cc: josephsih@...gle.com, chromeos-bluetooth-upstreaming@...omium.org,
Chethan T N <chethan.tumkur.narayan@...el.com>,
Miao-chen Chou <mcchou@...omium.org>,
Kiran K <kiran.k@...el.com>,
Joseph Hwang <josephsih@...omium.org>,
Johan Hedberg <johan.hedberg@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH v6 2/4] Bluetooth: btintel: support link statistics telemetry events
From: Chethan T N <chethan.tumkur.narayan@...el.com>
This patch supports the link statistics telemetry events for
intel controllers
Reviewed-by: Miao-chen Chou <mcchou@...omium.org>
Signed-off-by: Chethan T N <chethan.tumkur.narayan@...el.com>
Signed-off-by: Kiran K <kiran.k@...el.com>
Signed-off-by: Joseph Hwang <josephsih@...omium.org>
---
(no changes since v1)
drivers/bluetooth/btintel.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index e44b6993cf91..fd21ddb76928 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -1248,8 +1248,10 @@ EXPORT_SYMBOL_GPL(btintel_read_debug_features);
int btintel_set_debug_features(struct hci_dev *hdev,
const struct intel_debug_features *features)
{
- u8 mask[11] = { 0x0a, 0x92, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00,
+ u8 mask[11] = { 0x0a, 0x92, 0x02, 0x7f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00 };
+ u8 period[5] = { 0x04, 0x91, 0x02, 0x05, 0x00 };
+ u8 trace_enable = 0x02;
struct sk_buff *skb;
if (!features)
@@ -1266,8 +1268,24 @@ int btintel_set_debug_features(struct hci_dev *hdev,
PTR_ERR(skb));
return PTR_ERR(skb);
}
+ kfree_skb(skb);
+
+ skb = __hci_cmd_sync(hdev, 0xfc8b, 5, period, HCI_INIT_TIMEOUT);
+ if (IS_ERR(skb)) {
+ bt_dev_err(hdev, "Setting periodicity for link statistics traces failed (%ld)",
+ PTR_ERR(skb));
+ return PTR_ERR(skb);
+ }
+ kfree_skb(skb);
+ skb = __hci_cmd_sync(hdev, 0xfca1, 1, &trace_enable, HCI_INIT_TIMEOUT);
+ if (IS_ERR(skb)) {
+ bt_dev_err(hdev, "Enable tracing of link statistics events failed (%ld)",
+ PTR_ERR(skb));
+ return PTR_ERR(skb);
+ }
kfree_skb(skb);
+
return 0;
}
EXPORT_SYMBOL_GPL(btintel_set_debug_features);
--
2.32.0.554.ge1b32706d8-goog
Powered by blists - more mailing lists