]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:37 +0000 (18:19 -0400)
commit0ce1229cbba6a3945ccc4e3162a81f97e21caa65
treea70e96a85d588d2c34441495f8b516a32c299afb
parent988b77ba0df06b9c995d947ea29f0e13646f44f7
Bluetooth: hci_core: Cancel request on command timeout

[ Upstream commit 63298d6e752fc0ec7f5093860af8bc9f047b30c8 ]

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>
Stable-dep-of: 2615fd9a7c25 ("Bluetooth: hci_sync: Fix overwriting request callback")
Signed-off-by: Sasha Levin <sashal@kernel.org>
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