Re: [PATCH v3 1/1] Bluetooth: Remove unneeded commands for suspend

From: Marcel Holtmann
Date: Wed Mar 03 2021 - 13:55:01 EST


Hi Abhishek,

> 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@xxxxxxxxxxxx>
> Reviewed-by: Archie Pusaka <apusaka@xxxxxxxxxxxx>
> Reviewed-by: Alain Michaud <alainm@xxxxxxxxxxxx>
> ---
>
> Changes in v3:
> * Minor change to if statement
>
> Changes in v2:
> * Removed hci_dev_lock from hci_cc_set_event_filter since flags are
> set/cleared atomically
>
> include/net/bluetooth/hci.h | 1 +
> net/bluetooth/hci_event.c | 27 +++++++++++++++++++++++
> net/bluetooth/hci_request.c | 44 +++++++++++++++++++++++--------------
> 3 files changed, 55 insertions(+), 17 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel