Bluetooth: hci_sync: Fix not processing all entries on cmd_sync_work
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 2 Mar 2022 21:02:45 +0000 (13:02 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 3 Mar 2022 12:30:03 +0000 (13:30 +0100)
commit008ee9eb8a11bcabf12c91771dd4f470b082bd44
tree45c747c2e8595b8b5e98bc15854e2aa1b39899fb
parent815d5121927093017947fd76e627da03f0f70be7
Bluetooth: hci_sync: Fix not processing all entries on cmd_sync_work

hci_cmd_sync_queue can be called multiple times, each adding a
hci_cmd_sync_work_entry, before hci_cmd_sync_work is run so this makes
sure they are all dequeued properly otherwise it creates a backlog of
entries that are never run.

Link: https://lore.kernel.org/all/CAJCQCtSeUtHCgsHXLGrSTWKmyjaQDbDNpP4rb0i+RE+L2FTXSA@mail.gmail.com/T/
Fixes: 6a98e3836fa20 ("Bluetooth: Add helper for serialized HCI command execution")
Tested-by: Chris Clayton <chris2553@googlemail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_sync.c