Skip to content

Commit 2b7f2d1

Browse files
Vudentzopsiff
authored andcommitted
Bluetooth: hci_sync: Fix hci_resume_advertising_sync
[ 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: ad383c2 ("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> (cherry picked from commit 6a0070c5c3ad37827a51b4e7e319b9b1d150aad9)
1 parent dd61968 commit 2b7f2d1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

net/bluetooth/hci_sync.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2639,6 +2639,13 @@ static int hci_resume_advertising_sync(struct hci_dev *hdev)
26392639
hci_remove_ext_adv_instance_sync(hdev, adv->instance,
26402640
NULL);
26412641
}
2642+
2643+
/* If current advertising instance is set to instance 0x00
2644+
* then we need to re-enable it.
2645+
*/
2646+
if (!hdev->cur_adv_instance)
2647+
err = hci_enable_ext_advertising_sync(hdev,
2648+
hdev->cur_adv_instance);
26422649
} else {
26432650
/* Schedule for most recent instance to be restarted and begin
26442651
* the software rotation loop

0 commit comments

Comments
 (0)