diff mbox series

[1/2] Bluetooth: Add management API for Mesh support

Message ID 20211202222619.626678-2-brian.gix@intel.com (mailing list archive)
State Changes Requested
Headers show
Series Kernel based Mesh support | expand

Checks

Context Check Description
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/buildkernel success Build Kernel PASS
tedd_an/testrunnersetup success Test Runner Setup PASS
tedd_an/testrunnerl2cap-tester success Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerbnep-tester success Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnermgmt-tester success Total: 493, Passed: 492 (99.8%), Failed: 0, Not Run: 1
tedd_an/testrunnerrfcomm-tester success Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersco-tester success Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersmp-tester success Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunneruserchan-tester success Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0

Commit Message

Brian Gix Dec. 2, 2021, 10:26 p.m. UTC
MGMT_OP_SET_MESH - Puts the controller into Mesh mode so that it will
always be passively scanning, without filtering duplicates, for ADV
packets that include a list of AD types.

MGMT_OP_MESH_SEND - Requests the transmission (Advertisement) of a
single PDU.

MGMT_EV_MESH_DEVICE_FOUND - MGMT Event indicating an incoming ADV packet
has been received, which includes at least one of the AD Types requested
by MGMT_OP_SET_MESH.

Signed-off-by: Brian Gix <brian.gix@intel.com>
---
 include/net/bluetooth/mgmt.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
diff mbox series

Patch

diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index 107b25deae68..ac813767dcf4 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -837,6 +837,22 @@  struct mgmt_cp_add_adv_patterns_monitor_rssi {
 	struct mgmt_adv_pattern patterns[];
 } __packed;
 #define MGMT_ADD_ADV_PATTERNS_MONITOR_RSSI_SIZE	8
+#define MGMT_OP_SET_MESH		0x0057
+struct mgmt_cp_set_mesh {
+	__u8   enable;
+	__u8   active;
+	__u8   ad_types[];
+} __packed;
+#define MGMT_SET_MESH_SIZE		2
+
+#define MGMT_OP_MESH_SEND		0x0058
+struct mgmt_cp_mesh_send {
+	__u32  instant;
+	__u16  delay;
+	__u8   cnt;
+	__u8   data[];
+} __packed;
+#define MGMT_MESH_SEND_SIZE		7
 
 #define MGMT_EV_CMD_COMPLETE		0x0001
 struct mgmt_ev_cmd_complete {
@@ -1104,3 +1120,13 @@  struct mgmt_ev_controller_resume {
 #define MGMT_WAKE_REASON_NON_BT_WAKE		0x0
 #define MGMT_WAKE_REASON_UNEXPECTED		0x1
 #define MGMT_WAKE_REASON_REMOTE_WAKE		0x2
+
+#define MGMT_EV_MESH_DEVICE_FOUND	0x002f
+struct mgmt_ev_mesh_device_found {
+	struct mgmt_addr_info addr;
+	__s8	rssi;
+	__le32	instant;
+	__le32	flags;
+	__le16	eir_len;
+	__u8	eir[];
+} __packed;