Skip to contentSkip to conversation

Bluetooth: Move Set Device ID command to use hci_cmd_sync_queue

RFC PATCH In review Marcel Holtmann 1 participant 1 message May 19, 2021

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

RFC PATCH 2/2 Bluetooth: Move Set Device ID command to use hci_cmd_sync_queue

This is an attempt for converting Set Device ID to use hci_cmd_sync_queue. This command is rather simple since the mgmt_cmd_complete is always send and the update is done unconditional, but it shows how easy the converion from hci_req_run can be.

However create_eir function and alike would have to be moved into a better location. This be better located in hci_br.c and nicely abstracted.

---
 net/bluetooth/hci_request.c |  2 +-
 net/bluetooth/mgmt.c        | 44 ++++++++++++++++++++++++++++++++-----
 2 files changed, 40 insertions(+), 6 deletions(-)
net/bluetooth/hci_request.c +1 -1
index fa9125b782f8..f91c5b558169 100644
@@ -631,7 +631,7 @@ static u8 *create_uuid128_list(struct hci_dev *hdev, u8 *data, ptrdiff_t len)
 	return ptr;
 }
 
-static void create_eir(struct hci_dev *hdev, u8 *data)
+void create_eir(struct hci_dev *hdev, u8 *data)
 {
 	u8 *ptr = data;
 	size_t name_len;
net/bluetooth/mgmt.c +39 -5

62 lines not on this page · raw message

Signature · 1 line
2.31.1