Bluetooth: Remove unneeded commands for suspend
authorAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
Wed, 3 Mar 2021 16:34:04 +0000 (08:34 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 3 Mar 2021 16:49:29 +0000 (17:49 +0100)
commite5b0ad69c97a04f42834b24a6a0323ab15ccc9bb
tree7138e190d246a6dfce76b9d117f086abffee9e53
parent5cb08553f7f2536f2f5a9142a060af2a77c1d5dc
Bluetooth: Remove unneeded commands for suspend

During suspend, there are a few scan enable and set event filter
commands that don't need to be sent unless there are actual BR/EDR
devices capable of waking the system. Check the HCI_PSCAN bit before
writing scan enable and use a new dev flag, HCI_EVENT_FILTER_CONFIGURED
to control whether to clear the event filter.

Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-by: Archie Pusaka <apusaka@chromium.org>
Reviewed-by: Alain Michaud <alainm@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/hci.h
net/bluetooth/hci_event.c
net/bluetooth/hci_request.c