linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
To: luiz.dentz@gmail.com, linux-bluetooth@vger.kernel.org
Cc: alainm@chromium.org, marcel@holtmann.org,
	chromeos-bluetooth-upstreaming@chromium.org,
	Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Subject: [BlueZ PATCH v6 1/6] mgmt: Add mgmt op and events for device flags
Date: Mon, 29 Jun 2020 16:02:18 -0700	[thread overview]
Message-ID: <20200629160206.BlueZ.v6.1.I3a6c238b09e1a0fad69e69cc2e6f4063af989b37@changeid> (raw)
In-Reply-To: <20200629230223.3538949-1-abhishekpandit@chromium.org>

Add Get Device Flags, Set Device Flags and Device Flags Changed.

---

Changes in v6: None
Changes in v5:
- Use device_flags mgmt op

Changes in v4: None
Changes in v3: None
Changes in v2: None

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

diff --git a/lib/mgmt.h b/lib/mgmt.h
index fad1f3dfe..525c4dd62 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -654,6 +654,27 @@ struct mgmt_cp_set_default_runtime_config {
 	uint8_t parameters[0]; /* mgmt_tlv */
 } __packed;
 
+#define MGMT_OP_GET_DEVICE_FLAGS	0x004F
+#define MGMT_GET_DEVICE_FLAGS_SIZE	7
+struct mgmt_cp_get_device_flags {
+	struct mgmt_addr_info addr;
+} __packed;
+struct mgmt_rp_get_device_flags {
+	struct mgmt_addr_info addr;
+	uint32_t supported_flags;
+	uint32_t current_flags;
+} __packed;
+
+#define MGMT_OP_SET_DEVICE_FLAGS	0x0050
+#define MGMT_SET_DEVICE_FLAGS_SIZE	11
+struct mgmt_cp_set_device_flags {
+	struct mgmt_addr_info addr;
+	uint32_t current_flags;
+} __packed;
+struct mgmt_rp_set_device_flags {
+	struct mgmt_addr_info addr;
+} __packed;
+
 #define MGMT_ADV_MONITOR_FEATURE_MASK_OR_PATTERNS	(1 << 0)
 
 #define MGMT_OP_READ_ADV_MONITOR_FEATURES	0x0051
@@ -919,6 +940,13 @@ struct mgmt_ev_exp_feature_changed {
 	uint32_t flags;
 } __packed;
 
+#define MGMT_EV_DEVICE_FLAGS_CHANGED		0x002a
+struct mgmt_ev_device_flags_changed {
+	struct mgmt_addr_info addr;
+	uint32_t supported_flags;
+	uint32_t current_flags;
+} __packed;
+
 #define MGMT_EV_ADV_MONITOR_ADDED	0x002b
 struct mgmt_ev_adv_monitor_added {
 	uint16_t monitor_handle;
@@ -1007,6 +1035,8 @@ static const char *mgmt_op[] = {
 	"Set Experimental Feature",
 	"Read Default System Configuration",
 	"Set Default System Configuration",
+	"Get Device Flags",
+	"Set Device Flags",				/* 0x0050 */
 	"Read Advertisement Monitor Features",
 	"Add Advertisement Patterns Monitor",
 	"Remove Advertisement Monitor",
@@ -1053,6 +1083,7 @@ static const char *mgmt_ev[] = {
 	"Extended Controller Information Changed",
 	"PHY Configuration Changed",
 	"Experimental Feature Changed",
+	"Device Flags Changed",
 	"Advertisement Monitor Added",			/* 0x002b */
 	"Advertisement Monitor Removed",
 };
-- 
2.27.0.212.ge8ba1cc988-goog


  reply	other threads:[~2020-06-29 23:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29 23:02 [BlueZ PATCH v6 0/6] device: Allow devices to be marked as wake capable Abhishek Pandit-Subedi
2020-06-29 23:02 ` Abhishek Pandit-Subedi [this message]
2020-06-29 23:19   ` bluez.test.bot
2020-06-29 23:02 ` [BlueZ PATCH v6 2/6] monitor: Decode device flags mgmt ops and event Abhishek Pandit-Subedi
2020-06-29 23:02 ` [BlueZ PATCH v6 3/6] device: Support marking a device with wake allowed Abhishek Pandit-Subedi
2020-06-29 23:17   ` [BlueZ,v6,3/6] " bluez.test.bot
2020-06-29 23:02 ` [BlueZ PATCH v6 4/6] client: Display wake allowed property with info Abhishek Pandit-Subedi
2020-06-29 23:02 ` [BlueZ PATCH v6 5/6] doc/device-api: Add WakeAllowed Abhishek Pandit-Subedi
2020-06-29 23:02 ` [BlueZ PATCH v6 6/6] input: Make HID devices support wake 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=20200629160206.BlueZ.v6.1.I3a6c238b09e1a0fad69e69cc2e6f4063af989b37@changeid \
    --to=abhishekpandit@chromium.org \
    --cc=alainm@chromium.org \
    --cc=chromeos-bluetooth-upstreaming@chromium.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.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).