android_kernel_xiaomi_sm8350/include/net/bluetooth
Johan Hedberg 23bb57633d Bluetooth: Fix __hci_request synchronization for hci_open_dev
The initialization function used by hci_open_dev (hci_init_req) sends
many different HCI commands. The __hci_request function should only
return when all of these commands have completed (or a timeout occurs).
Several of these commands cause hci_req_complete to be called which
causes __hci_request to return prematurely.

This patch fixes the issue by adding a new hdev->req_last_cmd variable
which is set during the initialization procedure. The hci_req_complete
function will no longer mark the request as complete until the command
matching hdev->req_last_cmd completes.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2010-12-22 22:58:07 -02:00
..
bluetooth.h Bluetooth: Make hci_send_to_sock usable for management control sockets 2010-12-07 23:03:39 -02:00
hci_core.h Bluetooth: Fix __hci_request synchronization for hci_open_dev 2010-12-22 22:58:07 -02:00
hci.h Bluetooth: Add Bluetooth Management interface definitions 2010-12-07 22:59:54 -02:00
l2cap.h Bluetooth: clean up legal text 2010-12-01 21:04:43 -02:00
mgmt.h Bluetooth: Add management events for controller addition & removal 2010-12-22 22:58:00 -02:00
rfcomm.h Bluetooth: clean up legal text 2010-12-01 21:04:43 -02:00
sco.h Bluetooth: clean up legal text 2010-12-01 21:04:43 -02:00