Bluetooth: hci_core: Cancel request on command timeout
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 9 Jan 2024 18:45:40 +0000 (13:45 -0500)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 6 Mar 2024 22:22:38 +0000 (17:22 -0500)
commit63298d6e752fc0ec7f5093860af8bc9f047b30c8
treede9da8f2791140f77dff2c423aac9b781c65fe1a
parent79c0868ad65a8fc7cdfaa5f2b77a4b70d0b0ea16
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 <luiz.von.dentz@intel.com>
include/net/bluetooth/hci_sync.h
net/bluetooth/hci_core.c
net/bluetooth/hci_request.c
net/bluetooth/hci_sync.c
net/bluetooth/mgmt.c