Skip to contentSkip to conversation

Bluetooth: btusb: Add routine for applying Intel DDC parameters

PATCH Superseded Tedd Ho-Jeong An 1 participant 2 messages May 18, 2015 – May 20, 2015 Bluetooth drivers

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Bluetooth: btusb: Add routine for applying Intel DDC parameters

From: Tedd Ho-Jeong An <[email protected]>

This patch adds the routine to apply the DDC parameter from device specific ddc file.

Once the device is rest to operational mode, optionally, it can download the device specific configration (DDC) parameters before the BlueZ starts the stack initialization.

It opens the DDC file based on HW_VARIANT and send ID/Value with HCI_Intel_Write_DDC command.

Format of DDC file
DDC file consists of one or more number of DDC structure that has a 'Length' field of one octet, DDC 'ID' field of two octets followed by the array of DDC 'Value' that gives the value of parameters itself. 'Length' contains the length of DDC 'ID' and DDC 'Value'.

+------------+----------+
| Size(byte) |    Name  |
+------------+----------+
|      1     | Length   |
+------------+----------+
|      2     | ID       |
+------------+----------+
| Length - 2 | Value    |
+------------+----------+

In case of command failure, it returns the command complete with parameter that contains the ID that failed to apply.

---
 drivers/bluetooth/btintel.h |  5 ++++
 drivers/bluetooth/btusb.c   | 70 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)
drivers/bluetooth/btintel.h +5 -0
index 4bda6ab..affb216 100644
@@ -69,6 +69,11 @@ struct intel_secure_send_result {
 	__u8     status;
 } __packed;
 
+struct intel_write_ddc {
+	__u8	status;
+	__le16	failed_id;
+} __packed;
+
 #if IS_ENABLED(CONFIG_BT_INTEL)
 
 int btintel_check_bdaddr(struct hci_dev *hdev);
drivers/bluetooth/btusb.c +70 -0

82 lines not on this page · raw message

Signature · 1 line
2.1.0
author
#1 lore raw

SGkNCg0KDQpPbiA1LzE4LzE1LCAzOjUyIFBNLCAiQW4sIFRlZGQiIDx0ZWRkLmFuQGludGVsLmNv bT4gd3JvdGU6DQoNCj5Gcm9tOiBUZWRkIEhvLUplb25nIEFuIDx0ZWRkLmFuQGludGVsLmN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