* [PATCH v2] Add Mesh management API
@ 2017-10-11 19:03 Brian Gix
2017-10-11 19:39 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 2+ messages in thread
From: Brian Gix @ 2017-10-11 19:03 UTC (permalink / raw)
To: marcel, linux-bluetooth; +Cc: Brian Gix
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] Add Mesh management API
2017-10-11 19:03 [PATCH v2] Add Mesh management API Brian Gix
@ 2017-10-11 19:39 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2017-10-11 19:39 UTC (permalink / raw)
To: Brian Gix; +Cc: Marcel Holtmann, linux-bluetooth@vger.kernel.org
Hi Brian,
On Wed, Oct 11, 2017 at 10:03 PM, Brian Gix <brian.gix@intel.com> wrote:
> Version 2 of patch that fixes compile errors
I guess a better start for this set would be to add the documentation
to userspace.
> ---
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-11 19:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-11 19:03 [PATCH v2] Add Mesh management API Brian Gix
2017-10-11 19:39 ` Luiz Augusto von Dentz
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).