netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 v4 1/5] Bluetooth: Add mgmt op set_wake_capable
Date: Sun, 8 Mar 2020 09:28:48 +0100	[thread overview]
Message-ID: <417309A5-3C77-4EC3-BEA9-B0136C64625C@holtmann.org> (raw)
In-Reply-To: <20200303170610.RFC.v4.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. For LE devices, the wakeable property is added to
> the connection parameter and can only be modified after calling
> add_device.
> 
> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> ---
> 
> Changes in v4: None
> Changes in v3:
> * Added wakeable property to le_conn_param
> * Use wakeable list for BR/EDR and wakeable property for LE
> 
> Changes in v2: None
> 
> include/net/bluetooth/hci_core.h |  2 ++
> include/net/bluetooth/mgmt.h     |  7 +++++
> net/bluetooth/hci_core.c         |  1 +
> net/bluetooth/mgmt.c             | 51 ++++++++++++++++++++++++++++++++
> 4 files changed, 61 insertions(+)
> 
> diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
> index dcc0dc6e2624..9d9ada5bc9d4 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;
> 	struct list_head	uuids;
> 	struct list_head	link_keys;
> 	struct list_head	long_term_keys;
> @@ -575,6 +576,7 @@ struct hci_conn_params {
> 
> 	struct hci_conn *conn;
> 	bool explicit_connect;
> +	bool wakeable;
> };

I do not want to commit to the mgmt API just yet. So I would prefer that the two changes above go into the respective BR/EDR and LE patches to enable this feature. And that the mgmt command comes last in this series. Then I can start applying the initial patches and we just have to discuss on how we want to expose this for blueoothd to use.

Regards

Marcel


  reply	other threads:[~2020-03-08  8:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-04  1:06 [RFC PATCH v4 0/5] Bluetooth: Handle system suspend gracefully Abhishek Pandit-Subedi
2020-03-04  1:06 ` [RFC PATCH v4 1/5] Bluetooth: Add mgmt op set_wake_capable Abhishek Pandit-Subedi
2020-03-08  8:28   ` Marcel Holtmann [this message]
2020-03-04  1:06 ` [RFC PATCH v4 2/5] Bluetooth: Handle PM_SUSPEND_PREPARE and PM_POST_SUSPEND Abhishek Pandit-Subedi
2020-03-08  8:28   ` Marcel Holtmann
2020-03-04  1:06 ` [RFC PATCH v4 3/5] Bluetooth: Handle BR/EDR devices during suspend Abhishek Pandit-Subedi
2020-03-08  8:30   ` Marcel Holtmann
2020-03-04  1:06 ` [RFC PATCH v4 4/5] Bluetooth: Handle LE " Abhishek Pandit-Subedi
2020-03-08  8:37   ` Marcel Holtmann
2020-03-04  1:06 ` [RFC PATCH v4 5/5] Bluetooth: Pause discovery and advertising " Abhishek Pandit-Subedi
2020-03-08  8:38   ` Marcel Holtmann

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=417309A5-3C77-4EC3-BEA9-B0136C64625C@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).