linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BlueZ PATCH v1] lib: Add definitions for advertisement monitor features
@ 2020-05-18 23:53 Miao-chen Chou
  2020-05-19  1:36 ` [BlueZ,v1] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Miao-chen Chou @ 2020-05-18 23:53 UTC (permalink / raw)
  To: Bluetooth Kernel Mailing List
  Cc: Yoni Shavit, Michael Sun, Luiz Augusto von Dentz, Alain Michaud,
	Marcel Holtmann, Miao-chen Chou

This adds the following command opcodes, event codes and the corresponding
structures.
- MGMT_OP_READ_ADV_MONITOR_FEATURES
- MGMT_OP_ADD_ADV_PATTERNS_MONITOR
- MGMT_OP_REMOVE_ADV_MONITOR
- MGMT_EV_ADV_MONITOR_ADDED
- MGMT_EV_ADV_MONITOR_REMOVED
---

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

diff --git a/lib/mgmt.h b/lib/mgmt.h
index b4fc72069..9fc9c1717 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -628,6 +628,42 @@ struct mgmt_rp_set_exp_feature {
 	uint32_t flags;
 } __packed;
 
+#define MGMT_ADV_MONITOR_FEATURE_MASK_OR_PATTERNS	(1 << 0)
+
+#define MGMT_OP_READ_ADV_MONITOR_FEATURES	0x004B
+struct mgmt_rp_read_adv_monitor_features {
+	__u32 supported_features;
+	__u32 enabled_features;
+	__u16 max_num_handles;
+	__u8 max_num_patterns;
+	__16 num_handles;
+	__16 handles[0];
+}  __packed;
+
+struct mgmt_adv_pattern {
+	__u8 ad_type;
+	__u8 offset;
+	__u8 length;
+	__u8 value[31];
+} __packed;
+
+#define MGMT_OP_ADD_ADV_PATTERNS_MONITOR	0x004C
+struct mgmt_cp_add_adv_patterns_monitor {
+	__u8 pattern_count;
+	struct mgmt_adv_pattern patterns[0];
+} __packed;
+struct mgmt_rp_add_adv_patterns_monitor {
+	__u16 monitor_handle;
+} __packed;
+
+#define MGMT_OP_REMOVE_ADV_MONITOR		0x004D
+struct mgmt_cp_remove_adv_monitor {
+	__u16 monitor_handle;
+} __packed;
+struct mgmt_rp_remove_adv_monitor {
+	__u16 monitor_handle;
+} __packed;
+
 #define MGMT_EV_CMD_COMPLETE		0x0001
 struct mgmt_ev_cmd_complete {
 	uint16_t opcode;
@@ -857,6 +893,16 @@ struct mgmt_ev_exp_feature_changed {
 	uint32_t flags;
 } __packed;
 
+#define MGMT_EV_ADV_MONITOR_ADDED	0x0028
+struct mgmt_ev_adv_monitor_added {
+	__u16 monitor_handle;
+}  __packed;
+
+#define MGMT_EV_ADV_MONITOR_REMOVED	0x0029
+struct mgmt_ev_adv_monitor_removed {
+	__u16 monitor_handle;
+}  __packed;
+
 static const char *mgmt_op[] = {
 	"<0x0000>",
 	"Read Version",
@@ -933,6 +979,9 @@ static const char *mgmt_op[] = {
 	"Read Security Information",			/* 0x0048 */
 	"Read Experimental Features Information",
 	"Set Experimental Feature",
+	"Read Advertisement Monitor Features",
+	"Add Advertisement Patterns Monitor",
+	"Remove Advertisement Monitor",
 };
 
 static const char *mgmt_ev[] = {
@@ -976,6 +1025,8 @@ static const char *mgmt_ev[] = {
 	"Extended Controller Information Changed",
 	"PHY Configuration Changed",
 	"Experimental Feature Changed",
+	"Advertisement Monitor Added",			/* 0x0028 */
+	"Advertisement Monitor Removed",
 };
 
 static const char *mgmt_status[] = {
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [BlueZ,v1] lib: Add definitions for advertisement monitor features
  2020-05-18 23:53 [BlueZ PATCH v1] lib: Add definitions for advertisement monitor features Miao-chen Chou
@ 2020-05-19  1:36 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2020-05-19  1:36 UTC (permalink / raw)
  To: linux-bluetooth, mcchou

[-- Attachment #1: Type: text/plain, Size: 2115 bytes --]


This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
While we are preparing for reviewing the patches, we found the following
issue/warning.

Test Result:
checkbuild Failed

Outputs:
ar: `u' modifier ignored since `D' is the default (see `U')
In file included from src/shared/mgmt.c:34:
./lib/mgmt.h:635:2: error: unknown type name ‘__u32’
  635 |  __u32 supported_features;
      |  ^~~~~
./lib/mgmt.h:636:2: error: unknown type name ‘__u32’
  636 |  __u32 enabled_features;
      |  ^~~~~
./lib/mgmt.h:637:2: error: unknown type name ‘__u16’
  637 |  __u16 max_num_handles;
      |  ^~~~~
./lib/mgmt.h:638:2: error: unknown type name ‘__u8’
  638 |  __u8 max_num_patterns;
      |  ^~~~
./lib/mgmt.h:639:2: error: unknown type name ‘__16’
  639 |  __16 num_handles;
      |  ^~~~
./lib/mgmt.h:640:2: error: unknown type name ‘__16’
  640 |  __16 handles[0];
      |  ^~~~
./lib/mgmt.h:644:2: error: unknown type name ‘__u8’
  644 |  __u8 ad_type;
      |  ^~~~
./lib/mgmt.h:645:2: error: unknown type name ‘__u8’
  645 |  __u8 offset;
      |  ^~~~
./lib/mgmt.h:646:2: error: unknown type name ‘__u8’
  646 |  __u8 length;
      |  ^~~~
./lib/mgmt.h:647:2: error: unknown type name ‘__u8’
  647 |  __u8 value[31];
      |  ^~~~
./lib/mgmt.h:652:2: error: unknown type name ‘__u8’
  652 |  __u8 pattern_count;
      |  ^~~~
./lib/mgmt.h:656:2: error: unknown type name ‘__u16’
  656 |  __u16 monitor_handle;
      |  ^~~~~
./lib/mgmt.h:661:2: error: unknown type name ‘__u16’
  661 |  __u16 monitor_handle;
      |  ^~~~~
./lib/mgmt.h:664:2: error: unknown type name ‘__u16’
  664 |  __u16 monitor_handle;
      |  ^~~~~
./lib/mgmt.h:898:2: error: unknown type name ‘__u16’
  898 |  __u16 monitor_handle;
      |  ^~~~~
./lib/mgmt.h:903:2: error: unknown type name ‘__u16’
  903 |  __u16 monitor_handle;
      |  ^~~~~
make[1]: *** [Makefile:6807: src/shared/mgmt.lo] Error 1
make: *** [Makefile:4010: all] Error 2



---
Regards,
Linux Bluetooth

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-19  1:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-18 23:53 [BlueZ PATCH v1] lib: Add definitions for advertisement monitor features Miao-chen Chou
2020-05-19  1:36 ` [BlueZ,v1] " bluez.test.bot

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).