Bluetooth: hci_sync: Fix not always pausing advertising when necessary

hci_pause_advertising_sync shall always pause advertising until
hci_resume_advertising_sync but instance 0x00 doesn't count
in adv_instance_cnt so it was causing it to be skipped.
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent e9674143
...@@ -1701,10 +1701,8 @@ static int hci_pause_advertising_sync(struct hci_dev *hdev) ...@@ -1701,10 +1701,8 @@ static int hci_pause_advertising_sync(struct hci_dev *hdev)
int err; int err;
int old_state; int old_state;
/* If there are no instances or advertising has already been paused /* If already been paused there is nothing to do. */
* there is nothing to do. if (hdev->advertising_paused)
*/
if (!hdev->adv_instance_cnt || hdev->advertising_paused)
return 0; return 0;
bt_dev_dbg(hdev, "Pausing directed advertising"); bt_dev_dbg(hdev, "Pausing directed advertising");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment