From: Marcel Holtmann <marcel@holtmann.org>
To: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
Alain Michaud <alainm@chromium.org>,
linux-bluetooth@vger.kernel.org,
chromeos-bluetooth-upstreaming@chromium.org,
"David S. Miller" <davem@davemloft.net>,
Johan Hedberg <johan.hedberg@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [RFC PATCH v2 1/4] Bluetooth: Add mgmt op set_wake_capable
Date: Wed, 29 Jan 2020 05:42:43 +0100 [thread overview]
Message-ID: <8C3B4FA7-3A59-4E0C-B609-B6278470F46E@holtmann.org> (raw)
In-Reply-To: <20200127175842.RFC.v2.1.I797e2f4cb824299043e771f3ab9cef86ee09f4db@changeid>
Hi Abhishek.
> When the system is suspended, only some connected Bluetooth devices
> cause user input that should wake the system (mostly HID devices). Add
> a list to keep track of devices that can wake the system and add
> a management API to let userspace tell the kernel whether a device is
> wake capable or not.
>
> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> ---
>
> Changes in v2: None
>
> include/net/bluetooth/hci_core.h | 1 +
> include/net/bluetooth/mgmt.h | 7 ++++++
> net/bluetooth/hci_core.c | 1 +
> net/bluetooth/mgmt.c | 40 ++++++++++++++++++++++++++++++++
> 4 files changed, 49 insertions(+)
>
> diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
> index 89ecf0a80aa1..ce4bebcb0265 100644
> --- a/include/net/bluetooth/hci_core.h
> +++ b/include/net/bluetooth/hci_core.h
> @@ -394,6 +394,7 @@ struct hci_dev {
> struct list_head mgmt_pending;
> struct list_head blacklist;
> struct list_head whitelist;
> + struct list_head wakeable;
I have the feeling that using a separate list is making this more complicated for us than it needs to be. I think in parts this comes through the fact that BR/EDR devices are handled via the whitelist list and for LE devices we are using the conn params “framework”.
So maybe it is actually better to store in wakeable list just the BR/EDR devices. And ensure that wakeable is a subset of the whitelist list. And for LE we store it in the conn params lists.
At some point, I think we need to merge whitelist and wakeable list for BR/EDR into a proper structure that can hold this information and maybe also revamp the inquiry cache we are using.
I will comment on the rest when I go through the LE whitelist update patch (and yes, I realize or variable whitelist for BR/EDR is confusing).
Regards
Marcel
next prev parent reply other threads:[~2020-01-29 4:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 1:58 [RFC PATCH v2 0/4] Bluetooth: Handle system suspend gracefully Abhishek Pandit-Subedi
2020-01-28 1:58 ` [RFC PATCH v2 1/4] Bluetooth: Add mgmt op set_wake_capable Abhishek Pandit-Subedi
2020-01-29 4:42 ` Marcel Holtmann [this message]
2020-01-28 1:58 ` [RFC PATCH v2 2/4] Bluetooth: Handle PM_SUSPEND_PREPARE and PM_POST_SUSPEND Abhishek Pandit-Subedi
2020-01-28 1:58 ` [RFC PATCH v2 3/4] Bluetooth: Update filters/whitelists for suspend Abhishek Pandit-Subedi
2020-01-29 8:40 ` Marcel Holtmann
2020-01-29 19:04 ` Abhishek Pandit-Subedi
2020-02-13 8:29 ` Marcel Holtmann
2020-02-18 18:29 ` Abhishek Pandit-Subedi
2020-01-28 1:58 ` [RFC PATCH v2 4/4] Bluetooth: Pause discovery and advertising during suspend Abhishek Pandit-Subedi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8C3B4FA7-3A59-4E0C-B609-B6278470F46E@holtmann.org \
--to=marcel@holtmann.org \
--cc=abhishekpandit@chromium.org \
--cc=alainm@chromium.org \
--cc=chromeos-bluetooth-upstreaming@chromium.org \
--cc=davem@davemloft.net \
--cc=johan.hedberg@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).