Skip to content

Commit d1566cf

Browse files
Vudentzopsiff
authored andcommitted
Bluetooth: hci_sync: Fix hci_resume_advertising_sync
[ Upstream commit 1488af7 ] 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 23c9c485fa4c7c92c9430b6e0a3d4ce287c20ce3)
1 parent b980e63 commit d1566cf

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

net/bluetooth/hci_sync.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2604,6 +2604,13 @@ static int hci_resume_advertising_sync(struct hci_dev *hdev)
26042604
hci_remove_ext_adv_instance_sync(hdev, adv->instance,
26052605
NULL);
26062606
}
2607+
2608+
/* If current advertising instance is set to instance 0x00
2609+
* then we need to re-enable it.
2610+
*/
2611+
if (!hdev->cur_adv_instance)
2612+
err = hci_enable_ext_advertising_sync(hdev,
2613+
hdev->cur_adv_instance);
26072614
} else {
26082615
/* Schedule for most recent instance to be restarted and begin
26092616
* the software rotation loop

0 commit comments

Comments
 (0)