Skip to contentSkip to conversation

Bluetooth: btusb: Use proper data structures for Intel vendor events

PATCH Applied Marcel Holtmann 2 participants 2 messages Apr 9, 2015 Bluetooth drivers

lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH v3 1/1 Bluetooth: btusb: Use proper data structures for Intel vendor events

The Intel vendors events indicating firmware loading result and the bootup of the operational firmware are currently hardcoded byte comparisons. So intead of doing that, provide proper data structures and actually use them.

---
 drivers/bluetooth/btintel.h | 15 +++++++++
 drivers/bluetooth/btusb.c   | 79 ++++++++++++++++++++++++++++++---------------
 2 files changed, 68 insertions(+), 26 deletions(-)
drivers/bluetooth/btintel.h +15 -0
index d1581150679a..4bda6ab34f60 100644
@@ -54,6 +54,21 @@ struct intel_boot_params {
 	__u8     unlocked_state;
 } __packed;
 
+struct intel_bootup {
+	__u8     zero;
+	__u8     num_cmds;
+	__u8     source;
+	__u8     reset_type;
+	__u8     reset_reason;
+	__u8     ddc_status;
+} __packed;
+
+struct intel_secure_send_result {
+	__u8     result;
+	__le16   opcode;
+	__u8     status;
+} __packed;
+
 #if IS_ENABLED(CONFIG_BT_INTEL)
 
 int btintel_check_bdaddr(struct hci_dev *hdev);
drivers/bluetooth/btusb.c +53 -26

91 lines not on this page · raw message

Signature · 1 line
2.1.0
#1 lore raw

Hi Marcel,

Quoted 10 lines · Marcel Holtmann

The Intel vendors events indicating firmware loading result and the bootup of the operational firmware are currently hardcoded byte comparisons. So intead of doing that, provide proper data structures and actually use them.

---
 drivers/bluetooth/btintel.h | 15 +++++++++
 drivers/bluetooth/btusb.c   | 79 ++++++++++++++++++++++++++++++---------------
 2 files changed, 68 insertions(+), 26 deletions(-)

Applied to bluetooth-next. Thanks.

Johan