diff mbox series

[BlueZ,v3,2/9] lib: Add structures and constants for quality report event

Message ID 20220209092414.751642-2-josephsih@chromium.org (mailing list archive)
State Superseded
Headers show
Series [BlueZ,v3,1/9] doc: Add Bluetooth quality report event | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS

Commit Message

Joseph Hwang Feb. 9, 2022, 9:24 a.m. UTC
Add the new struct and constants to lib/mgmt.h.

Signed-off-by: Joseph Hwang <josephsih@chromium.org>
---

Changes in v3:
- Swap AOSP Bluetooth Quality Report Event and Intel Telemetry Event.

Changes in v2:
- This is a new patch for adding the new struct and constants.

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

Comments

Marcel Holtmann Feb. 9, 2022, 9:02 p.m. UTC | #1
Hi Joseph,

> Add the new struct and constants to lib/mgmt.h.
> 
> Signed-off-by: Joseph Hwang <josephsih@chromium.org>
> ---
> 
> Changes in v3:
> - Swap AOSP Bluetooth Quality Report Event and Intel Telemetry Event.
> 
> Changes in v2:
> - This is a new patch for adding the new struct and constants.
> 
> lib/mgmt.h | 10 ++++++++++
> 1 file changed, 10 insertions(+)
> 
> diff --git a/lib/mgmt.h b/lib/mgmt.h
> index 922a24367..db9a24cd6 100644
> --- a/lib/mgmt.h
> +++ b/lib/mgmt.h
> @@ -1032,6 +1032,15 @@ struct mgmt_ev_adv_monitor_device_lost {
> 	struct mgmt_addr_info addr;
> } __packed;
> 
> +#define MGMT_EV_QUALITY_REPORT			0x0031
> +#define QUALITY_SPEC_AOSP_BQR			0x0

Just AOSP.

> +#define QUALITY_SPEC_INTEL_TELEMETRY		0x1

Just INTEL.

> +struct mgmt_ev_quality_report {
> +	uint8_t quality_spec;
> +	uint32_t data_len;
> +	uint8_t data[];
> +} __packed;
> +
> static const char *mgmt_op[] = {
> 	"<0x0000>",
> 	"Read Version",
> @@ -1172,6 +1181,7 @@ static const char *mgmt_ev[] = {
> 	"Controller Resume",
> 	"Advertisement Monitor Device Found",		/* 0x002f */
> 	"Advertisement Monitor Device Lost",
> +	"Bluetooth Quality Report",			/* 0x0031 */
> };
> 
> static const char *mgmt_status[] = {

as with the mgmt-api.txt changes, just “Quality Report” and combine command and event changes.

Regards

Marcel
diff mbox series

Patch

diff --git a/lib/mgmt.h b/lib/mgmt.h
index 922a24367..db9a24cd6 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -1032,6 +1032,15 @@  struct mgmt_ev_adv_monitor_device_lost {
 	struct mgmt_addr_info addr;
 } __packed;
 
+#define MGMT_EV_QUALITY_REPORT			0x0031
+#define QUALITY_SPEC_AOSP_BQR			0x0
+#define QUALITY_SPEC_INTEL_TELEMETRY		0x1
+struct mgmt_ev_quality_report {
+	uint8_t quality_spec;
+	uint32_t data_len;
+	uint8_t data[];
+} __packed;
+
 static const char *mgmt_op[] = {
 	"<0x0000>",
 	"Read Version",
@@ -1172,6 +1181,7 @@  static const char *mgmt_ev[] = {
 	"Controller Resume",
 	"Advertisement Monitor Device Found",		/* 0x002f */
 	"Advertisement Monitor Device Lost",
+	"Bluetooth Quality Report",			/* 0x0031 */
 };
 
 static const char *mgmt_status[] = {