Bluetooth: hci_sync: Fix not disabling advertising instance
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 27 Jun 2025 16:31:33 +0000 (12:31 -0400)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 3 Jul 2025 15:35:52 +0000 (11:35 -0400)
As the code comments on hci_setup_ext_adv_instance_sync suggests the
advertising instance needs to be disabled in order to update its
parameters, but it was wrongly checking that !adv->pending.

Fixes: cba6b758711c ("Bluetooth: hci_sync: Make use of hci_cmd_sync_queue set 2")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_sync.c

index 77b3691f3423af6b58e2178817dd436cfc7626c8..0066627c05ebb98d7fd8b8a9793b4da5fab2a5ee 100644 (file)
@@ -1345,7 +1345,7 @@ int hci_setup_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance)
         * Command Disallowed error, so we must first disable the
         * instance if it is active.
         */
-       if (adv && !adv->pending) {
+       if (adv) {
                err = hci_disable_ext_adv_instance_sync(hdev, instance);
                if (err)
                        return err;