From: Brian Gix <brian.gix@intel.com>
To: marcel@holtmann.org, linux-bluetooth@vger.kernel.org
Cc: Brian Gix <brian.gix@intel.com>
Subject: [PATCH v2] Add Mesh management API
Date: Wed, 11 Oct 2017 12:03:07 -0700 [thread overview]
Message-ID: <20171011190307.28570-1-brian.gix@intel.com> (raw)
Version 2 of patch that fixes compile errors
---
include/net/bluetooth/mgmt.h | 91 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index 72a456b..6bfee19 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -604,6 +604,82 @@ struct mgmt_cp_set_appearance {
} __packed;
#define MGMT_SET_APPEARANCE_SIZE 2
+#define MGMT_OP_MESH_GET_OPTIONS 0x0044
+#define MGMT_MESH_GET_OPTIONS_SIZE 0
+struct mgmt_rp_mesh_get_options {
+ __u8 revision;
+ __u8 channel_map;
+ __s8 min_tx_power;
+ __s8 max_tx_power;
+ __u8 max_scan_filter;
+ __u8 max_filter_pattern;
+ __u8 max_adv_slot;
+} __packed;
+
+#define MGMT_OP_MESH_SET_SCAN_FILTER 0x0045
+struct mgmt_cp_set_scan_filter {
+ __u8 filter_id;
+ __u8 num_patterns;
+ __u8 patterns[30];
+} __packed;
+#define MGMT_MESH_SET_SCAN_FILTER_SIZE 32
+struct mgmt_rp_set_scan_filter {
+ __u8 filter_id;
+} __packed;
+
+#define MGMT_OP_MESH_SCAN 0x0046
+struct mgmt_cp_mesh_scan {
+ __u8 enable;
+ __u8 channel_map;
+ __u8 filter_id;
+} __packed;
+#define MGMT_MESH_SCAN_SIZE 3
+
+#define MGMT_OP_MESH_SEND 0x0047
+struct mgmt_cp_mesh_send {
+ __u8 adv_slot;
+ __u8 addr_type;
+ __u8 channel_map;
+ __s8 tx_power;
+ __u8 retx_count;
+ __u8 retx_interval;
+ __u8 scan_duration;
+ __u8 scan_delay;
+ __u8 scan_filter;
+ __u8 data_len;
+ __u8 data[31];
+} __packed;
+#define MGMT_MESH_SEND_SIZE 41
+struct mgmt_rp_mesh_send {
+ __u8 adv_slot;
+} __packed;
+
+#define MGMT_OP_MESH_SEND_TIMED 0x0048
+struct mgmt_cp_mesh_send_timed {
+ __u8 adv_slot;
+ __u8 addr_type;
+ __u8 channel_map;
+ __s8 tx_power;
+ __le32 instant;
+ __u8 tx_delay;
+ __u8 tx_window;
+ __u8 data_len;
+ __u8 data[31];
+} __packed;
+#define MGMT_MESH_SEND_TIMED_SIZE 42
+struct mgmt_rp_mesh_send_timed {
+ __u8 adv_slot;
+} __packed;
+
+#define MGMT_OP_MESH_SEND_CANCEL 0x0049
+struct mgmt_cp_mesh_send_cancel {
+ __u8 adv_slot;
+} __packed;
+#define MGMT_MESH_SEND_CANCEL_SIZE 1
+struct mgmt_rp_mesh_send_cancel {
+ __u8 adv_slot;
+} __packed;
+
#define MGMT_EV_CMD_COMPLETE 0x0001
struct mgmt_ev_cmd_complete {
__le16 opcode;
@@ -824,3 +900,18 @@ struct mgmt_ev_ext_info_changed {
__le16 eir_len;
__u8 eir[0];
} __packed;
+
+#define MGMT_EV_MESH_SEND_COMPLETE 0x0026
+struct mgmt_ev_mesh_send_complete {
+ __u8 adv_slot;
+} __packed;
+
+#define MGMT_EV_MESH_SCAN_REPORT 0x0027
+struct mgmt_ev_mesh_scan_report {
+ __u8 num_reports;
+ __u8 channel;
+ __s8 rssi;
+ __le32 instant;
+ __u8 data_len;
+ __u8 data[31];
+} __packed;
--
2.9.5
next reply other threads:[~2017-10-11 19:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 19:03 Brian Gix [this message]
2017-10-11 19:39 ` [PATCH v2] Add Mesh management API Luiz Augusto von Dentz
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=20171011190307.28570-1-brian.gix@intel.com \
--to=brian.gix@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--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).