Commit d4b70ba1 authored by clancy shang's avatar clancy shang Committed by Luiz Augusto von Dentz

Bluetooth: hci_sync: fix BR/EDR wakeup bug

when Bluetooth set the event mask and enter suspend, the controller
has hci mode change event coming, it cause controller can not enter
sleep mode. so it should to set the hci mode change event mask before
enter suspend.
Signed-off-by: default avatarclancy shang <clancy.shang@quectel.com>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent 3c83800a
......@@ -3732,12 +3732,14 @@ static int hci_set_event_mask_sync(struct hci_dev *hdev)
if (lmp_bredr_capable(hdev)) {
events[4] |= 0x01; /* Flow Specification Complete */
/* Don't set Disconnect Complete when suspended as that
* would wakeup the host when disconnecting due to
* suspend.
/* Don't set Disconnect Complete and mode change when
* suspended as that would wakeup the host when disconnecting
* due to suspend.
*/
if (hdev->suspended)
if (hdev->suspended) {
events[0] &= 0xef;
events[2] &= 0xf7;
}
} else {
/* Use a different default for LE-only devices */
memset(events, 0, sizeof(events));
......
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