Commit 1488af7b authored by Luiz Augusto von Dentz's avatar Luiz Augusto von Dentz
Browse files

Bluetooth: hci_sync: Fix hci_resume_advertising_sync



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: ad383c2c ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled")
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent 1c5091a9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2594,6 +2594,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