Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
From: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
To: luiz.dentz@gmail.com, marcel@holtmann.org
Cc: chromeos-bluetooth-upstreaming@chromium.org,
	linux-bluetooth@vger.kernel.org,
	Abhishek Pandit-Subedi <abhishekpandit@chromium.org>,
	Sonny Sasaka <sonnysasaka@chromium.org>
Subject: [RFC Bluez PATCH 1/3] mgmt: Add controller suspend and resume events
Date: Tue, 28 Jul 2020 18:55:38 -0700
Message-ID: <5f20d723.1c69fb81.6d882.1d20@mx.google.com> (raw)
In-Reply-To: <20200729015540.1848987-1-abhishekpandit@chromium.org>

Add the controller suspend and resume events.

Reviewed-by: Sonny Sasaka <sonnysasaka@chromium.org>
---

 lib/mgmt.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/lib/mgmt.h b/lib/mgmt.h
index a800bcab4..46d894ae9 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -772,6 +772,7 @@ struct mgmt_ev_device_connected {
 #define MGMT_DEV_DISCONN_TIMEOUT	0x01
 #define MGMT_DEV_DISCONN_LOCAL_HOST	0x02
 #define MGMT_DEV_DISCONN_REMOTE		0x03
+#define MGMT_DEV_DISCONN_LOCAL_HOST_SUSPEND	0x05
 
 #define MGMT_EV_DEVICE_DISCONNECTED	0x000C
 struct mgmt_ev_device_disconnected {
@@ -959,6 +960,17 @@ struct mgmt_ev_adv_monitor_removed {
 	uint16_t monitor_handle;
 }  __packed;
 
+#define MGMT_EV_CONTROLLER_SUSPEND		0x002d
+struct mgmt_ev_controller_suspend {
+	uint8_t suspend_state;
+} __packed;
+
+#define MGMT_EV_CONTROLLER_RESUME		0x002e
+struct mgmt_ev_controller_resume {
+	struct mgmt_addr_info addr;
+	uint8_t wake_reason;
+} __packed;
+
 static const char *mgmt_op[] = {
 	"<0x0000>",
 	"Read Version",
@@ -1088,6 +1100,8 @@ static const char *mgmt_ev[] = {
 	"Device Flags Changed",
 	"Advertisement Monitor Added",			/* 0x002b */
 	"Advertisement Monitor Removed",
+	"Controller Suspend",
+	"Controller Resume",
 };
 
 static const char *mgmt_status[] = {
-- 
2.28.0.rc0.142.g3c755180ce-goog


  reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29  1:55 [RFC Bluez PATCH 0/3] adapter: Reconnect audio when resuming from suspend Abhishek Pandit-Subedi
2020-07-29  1:55 ` Abhishek Pandit-Subedi [this message]
2020-07-29  1:55 ` [RFC Bluez PATCH 2/3] monitor: Add btmon support for Suspend and Resume events Abhishek Pandit-Subedi
2020-07-29  1:55 ` [RFC Bluez PATCH 3/3] adapter: Reconnect audio on controller resume Abhishek Pandit-Subedi
2020-08-04 18:54   ` Luiz Augusto von Dentz
2020-08-06  3:48     ` Abhishek Pandit-Subedi
2020-08-06 17:20       ` Luiz Augusto von Dentz
2020-08-04 17:12 ` [RFC Bluez PATCH 0/3] adapter: Reconnect audio when resuming from 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=5f20d723.1c69fb81.6d882.1d20@mx.google.com \
    --to=abhishekpandit@chromium.org \
    --cc=chromeos-bluetooth-upstreaming@chromium.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=sonnysasaka@chromium.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

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org
	public-inbox-index linux-bluetooth

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git