Skip to content

Commit ef61b6e

Browse files
apanditVudentz
authored andcommitted
Bluetooth: Always set event mask on suspend
When suspending, always set the event mask once disconnects are successful. Otherwise, if wakeup is disallowed, the event mask is not set before suspend continues and can result in an early wakeup. Fixes: 182ee45 ("Bluetooth: hci_sync: Rework hci_suspend_notifier") Cc: [email protected] Signed-off-by: Abhishek Pandit-Subedi <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 4b2f4e0 commit ef61b6e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

net/bluetooth/hci_sync.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4973,6 +4973,9 @@ int hci_suspend_sync(struct hci_dev *hdev)
49734973
return err;
49744974
}
49754975

4976+
/* Update event mask so only the allowed event can wakeup the host */
4977+
hci_set_event_mask_sync(hdev);
4978+
49764979
/* Only configure accept list if disconnect succeeded and wake
49774980
* isn't being prevented.
49784981
*/
@@ -4984,9 +4987,6 @@ int hci_suspend_sync(struct hci_dev *hdev)
49844987
/* Unpause to take care of updating scanning params */
49854988
hdev->scanning_paused = false;
49864989

4987-
/* Update event mask so only the allowed event can wakeup the host */
4988-
hci_set_event_mask_sync(hdev);
4989-
49904990
/* Enable event filter for paired devices */
49914991
hci_update_event_filter_sync(hdev);
49924992

0 commit comments

Comments
 (0)