Commit 123f6d3a authored by Luiz Augusto von Dentz's avatar Luiz Augusto von Dentz
Browse files

Bluetooth: hci_sync: Fix suspend performance regression



This attempts to fix suspend performance when there is no connections by
not updating the event mask.

Fixes: ef61b6ea ("Bluetooth: Always set event mask on suspend")
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent afcb3369
Loading
Loading
Loading
Loading
+14 −10
Original line number Diff line number Diff line
@@ -5549,6 +5549,7 @@ int hci_suspend_sync(struct hci_dev *hdev)
	/* Prevent disconnects from causing scanning to be re-enabled */
	hci_pause_scan_sync(hdev);

	if (hci_conn_count(hdev)) {
		/* Soft disconnect everything (power off) */
		err = hci_disconnect_all_sync(hdev, HCI_ERROR_REMOTE_POWER_OFF);
		if (err) {
@@ -5558,8 +5559,11 @@ int hci_suspend_sync(struct hci_dev *hdev)
			return err;
		}

	/* Update event mask so only the allowed event can wakeup the host */
		/* Update event mask so only the allowed event can wakeup the
		 * host.
		 */
		hci_set_event_mask_sync(hdev);
	}

	/* Only configure accept list if disconnect succeeded and wake
	 * isn't being prevented.