aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_request.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <[email protected]>2024-01-09 18:45:40 +0000
committerLuiz Augusto von Dentz <[email protected]>2024-03-06 22:22:38 +0000
commit63298d6e752fc0ec7f5093860af8bc9f047b30c8 (patch)
treede9da8f2791140f77dff2c423aac9b781c65fe1a /net/bluetooth/hci_request.c
parentBluetooth: hci_event: Use HCI error defines instead of magic values (diff)
downloadkernel-63298d6e752fc0ec7f5093860af8bc9f047b30c8.tar.gz
kernel-63298d6e752fc0ec7f5093860af8bc9f047b30c8.zip
Bluetooth: hci_core: Cancel request on command timeout
If command has timed out call __hci_cmd_sync_cancel to notify the hci_req since it will inevitably cause a timeout. This also rework the code around __hci_cmd_sync_cancel since it was wrongly assuming it needs to cancel timer as well, but sometimes the timers have not been started or in fact they already had timed out in which case they don't need to be cancel yet again. Signed-off-by: Luiz Augusto von Dentz <[email protected]>
Diffstat (limited to 'net/bluetooth/hci_request.c')
-rw-r--r--net/bluetooth/hci_request.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
index 6e023b0104b0..00e02138003e 100644
--- a/net/bluetooth/hci_request.c
+++ b/net/bluetooth/hci_request.c
@@ -895,7 +895,7 @@ void hci_request_setup(struct hci_dev *hdev)
void hci_request_cancel_all(struct hci_dev *hdev)
{
- __hci_cmd_sync_cancel(hdev, ENODEV);
+ hci_cmd_sync_cancel_sync(hdev, ENODEV);
cancel_interleave_scan(hdev);
}