Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1311894ybh; Sun, 8 Mar 2020 00:29:56 -0800 (PST) X-Google-Smtp-Source: ADFU+vuuHWyGqR6Ks+YNkxsCUCdNnEOrVtH6rqUUSTrwj8OWNqdM1XvPZqb4CLLTubHhPTV7k13n X-Received: by 2002:aca:5ad5:: with SMTP id o204mr7640309oib.2.1583656195958; Sun, 08 Mar 2020 00:29:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583656195; cv=none; d=google.com; s=arc-20160816; b=hy+A5O0WmMqnydu/RJKXzBWqbCOGpVQqbGNqxvGrrCCaUINGc4UOtXF4kBACRBZDCI 9U3jYjrfGktDCZcVVlmVgSo034ap8WppvxJjt5c2VXmOzqRDWUFekRCKDl6QhDJUc3FJ 3QVmTVV1FX0u/h5+ODx+RlPW7y2MfspGuHrvGwaa2eVGIdCrx0AvtKsZxolHgozJybpq bR4KU3s5DnjjRMPoEvfS5rAfxevAos0hV9GfR+KdB8pnzK6nSR8ykW9kFRiWcpir3Lgs DsD7gwFAFVukxiKqc9Ix+9c1WQDO6dJqRoRpY8Ekq/5PvZHc8ykb9JFrfjj/SJIJlYul ZrzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=pYod0FG5foEmdncKPIL/mFNPAzEcNv9OxarCUGuAsMw=; b=vn164x7527+3qITJXcKehmbgAMFkCt21fVO7BdvGjZTYKm+FNTuFaInseLFu7zWk+A PufHRjn7VCiS1N5QobDYhR9lneuY95UXVoLMFFVqWrV3bVuq7/OJGozmGYOWmu6XSHhI STtJa2QovUAitz0Bk3mcQfJlN8X0bHq75DXtNTNxPgZRdD27KVSRRkIB8zgbjFEPRgsV rDOX7Jm4eNLMCeMb7BdmT46APxtoO8FiZKd1ZarCM1R0GmCdl1++zi7WxQ55Mom4ZPPk NW8WiM1IK3xjXbgkwYmWKAR9Z9TX70RtBK9mSS8lc2JU7wKjHCBF8d2JxzaYby1SRxtr 2ydQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7si2406387oic.229.2020.03.08.00.29.44; Sun, 08 Mar 2020 00:29:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726297AbgCHI2v convert rfc822-to-8bit (ORCPT + 99 others); Sun, 8 Mar 2020 04:28:51 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:60270 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbgCHI2u (ORCPT ); Sun, 8 Mar 2020 04:28:50 -0400 Received: from marcel-macbook.fritz.box (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id B9FE9CED15; Sun, 8 Mar 2020 09:38:16 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: [RFC PATCH v4 1/5] Bluetooth: Add mgmt op set_wake_capable From: Marcel Holtmann In-Reply-To: <20200303170610.RFC.v4.1.I797e2f4cb824299043e771f3ab9cef86ee09f4db@changeid> Date: Sun, 8 Mar 2020 09:28:48 +0100 Cc: Luiz Augusto von Dentz , Alain Michaud , linux-bluetooth@vger.kernel.org, chromeos-bluetooth-upstreaming@chromium.org, "David S. Miller" , Johan Hedberg , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jakub Kicinski Content-Transfer-Encoding: 8BIT Message-Id: <417309A5-3C77-4EC3-BEA9-B0136C64625C@holtmann.org> References: <20200304010650.259961-1-abhishekpandit@chromium.org> <20200303170610.RFC.v4.1.I797e2f4cb824299043e771f3ab9cef86ee09f4db@changeid> To: Abhishek Pandit-Subedi X-Mailer: Apple Mail (2.3608.60.0.2.5) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 > --- > > 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