]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Bluetooth: hci_sync: Fix hci_resume_advertising_sync
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 5 Sep 2025 14:29:18 +0000 (10:29 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Oct 2025 11:40:39 +0000 (13:40 +0200)
[ Upstream commit 1488af7b8b5f9896ea88ee35aa3301713f72737c ]

hci_resume_advertising_sync is suppose to resume all instance paused by
hci_pause_advertising_sync, this logic is used for procedures are only
allowed when not advertising, but instance 0x00 was not being
re-enabled.

Fixes: ad383c2c65a5 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_sync.c

index a2c3b58db54c2cbe90bd6e49ad6f2bed08440f2d..4c1b2468989a89885e1d68675dcac576f567f660 100644 (file)
@@ -2595,6 +2595,13 @@ static int hci_resume_advertising_sync(struct hci_dev *hdev)
                        hci_remove_ext_adv_instance_sync(hdev, adv->instance,
                                                         NULL);
                }
+
+               /* If current advertising instance is set to instance 0x00
+                * then we need to re-enable it.
+                */
+               if (!hdev->cur_adv_instance)
+                       err = hci_enable_ext_advertising_sync(hdev,
+                                                             hdev->cur_adv_instance);
        } else {
                /* Schedule for most recent instance to be restarted and begin
                 * the software rotation loop