From: Brian Gix <brian.gix@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: brian.gix@intel.com, inga.stotland@intel.com
Subject: [PATCH 2/7] mgmt: Mesh specific structures and defines
Date: Wed, 23 Feb 2022 18:06:19 -0800 [thread overview]
Message-ID: <20220224020624.159247-3-brian.gix@intel.com> (raw)
In-Reply-To: <20220224020624.159247-1-brian.gix@intel.com>
Adds the Mesh commands and events as described in mgmt-api.txt
---
lib/mgmt.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/lib/mgmt.h b/lib/mgmt.h
index 922a24367..d5ec58228 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -757,6 +757,39 @@ struct mgmt_cp_add_adv_patterns_monitor_rssi {
struct mgmt_adv_pattern patterns[0];
} __packed;
+#define MGMT_OP_SET_MESH_RECEIVER 0x0057
+struct mgmt_cp_set_mesh {
+ uint8_t enable;
+ uint16_t window;
+ uint16_t period;
+ uint8_t num_ad_types;
+ uint8_t ad_types[];
+} __packed;
+
+#define MGMT_OP_MESH_READ_FEATURES 0x0058
+struct mgmt_rp_mesh_read_features {
+ uint16_t index;
+ uint8_t max_handles;
+ uint8_t used_handles;
+ uint8_t handles[];
+} __packed;
+
+
+#define MGMT_OP_MESH_SEND 0x0059
+struct mgmt_cp_mesh_send {
+ struct mgmt_addr_info addr;
+ uint64_t instant;
+ uint16_t delay;
+ uint8_t cnt;
+ uint8_t data[];
+} __packed;
+
+#define MGMT_OP_MESH_SEND_CANCEL 0x005A
+struct mgmt_cp_mesh_send_cancel {
+ uint8_t handle;
+} __packed;
+
+
#define MGMT_EV_CMD_COMPLETE 0x0001
struct mgmt_ev_cmd_complete {
uint16_t opcode;
@@ -1032,6 +1065,21 @@ struct mgmt_ev_adv_monitor_device_lost {
struct mgmt_addr_info addr;
} __packed;
+#define MGMT_EV_MESH_DEVICE_FOUND 0x0031
+struct mgmt_ev_mesh_device_found {
+ struct mgmt_addr_info addr;
+ int8_t rssi;
+ uint32_t flags;
+ uint64_t instant;
+ uint16_t eir_len;
+ uint8_t eir[];
+} __packed;
+
+#define MGMT_EV_MESH_PACKET_CMPLT 0x0032
+struct mgmt_ev_mesh_pkt_cmplt {
+ uint8_t handle;
+} __packed;
+
static const char *mgmt_op[] = {
"<0x0000>",
"Read Version",
@@ -1120,6 +1168,10 @@ static const char *mgmt_op[] = {
"Add Extended Advertisement Parameters", /* 0x0054 */
"Add Extended Advertisement Data",
"Add Advertisement Patterns Monitor RSSI",
+ "Set Mesh Receiver",
+ "Read Mesh Features",
+ "Mesh Send",
+ "Mesh Send Cancel",
};
static const char *mgmt_ev[] = {
@@ -1172,6 +1224,8 @@ static const char *mgmt_ev[] = {
"Controller Resume",
"Advertisement Monitor Device Found", /* 0x002f */
"Advertisement Monitor Device Lost",
+ "Mesh Packet Found",
+ "Mesh Packet Complete",
};
static const char *mgmt_status[] = {
--
2.35.1
next prev parent reply other threads:[~2022-02-24 2:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-24 2:06 [PATCH 0/7] Kernel based mesh functionality Brian Gix
2022-02-24 2:06 ` [PATCH 1/7] mgmt: Add support for Mesh in the kernel Brian Gix
2022-02-26 9:38 ` Kernel based mesh functionality bluez.test.bot
2022-02-24 2:06 ` Brian Gix [this message]
2022-02-24 2:06 ` [PATCH 3/7] mesh: Add common MGMT command accessors Brian Gix
2022-02-24 2:06 ` [PATCH 4/7] mesh: rework Mesh-IO for multiple transports Brian Gix
2022-02-24 2:06 ` [PATCH 5/7] mesh: Added default "auto" to command line parsing Brian Gix
2022-02-24 2:06 ` [PATCH 6/7] mesh: Add new MGMT based IO transport Brian Gix
2022-02-24 2:06 ` [PATCH 7/7] mesh: Make Provisioning requests more IO compatible Brian Gix
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=20220224020624.159247-3-brian.gix@intel.com \
--to=brian.gix@intel.com \
--cc=inga.stotland@intel.com \
--cc=linux-bluetooth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.