diff mbox series

[BlueZ,v5,7/8] monitor: print quality report cmd

Message ID 20220525105015.2315987-5-josephsih@chromium.org (mailing list archive)
State Superseded
Headers show
Series [BlueZ,v5,1/8] doc: Introduce the quality report command and event | expand

Commit Message

Joseph Hwang May 25, 2022, 10:50 a.m. UTC
This patch prints the set quality command properly.

---

(no changes since v4)

Changes in v4:
- Use get_u8() to replace *(uint8_t *).
- Use mgmt_new_settings_rsp as the rsp_func in mgmt_command_table
  for Set Quality Report.

Changes in v3:
- This is a new patch that prints the set quality command.

 monitor/packet.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/monitor/packet.c b/monitor/packet.c
index d80735a06..33b1f2fea 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -12216,6 +12216,7 @@  static const struct bitfield_data mgmt_settings_table[] = {
 	{ 15, "Static Address"		},
 	{ 16, "PHY Configuration"	},
 	{ 17, "Wideband Speech"		},
+	{ 18, "Quality Report"		},
 	{ }
 };
 
@@ -13812,6 +13813,13 @@  static void mgmt_remove_adv_monitor_patterns_rsp(const void *data,
 	print_field("Handle: %d", handle);
 }
 
+static void mgmt_set_quality_report_cmd(const void *data, uint16_t size)
+{
+	uint8_t action = get_u8(data);
+
+	print_field("Set Quality Report %u", action);
+}
+
 struct mgmt_data {
 	uint16_t opcode;
 	const char *str;
@@ -14069,6 +14077,9 @@  static const struct mgmt_data mgmt_command_table[] = {
 				mgmt_add_adv_monitor_patterns_rssi_cmd, 8,
 									false,
 				mgmt_add_adv_monitor_patterns_rsp, 2, true},
+	{ 0x0057, "Set Quality Report",
+				mgmt_set_quality_report_cmd, 1, true,
+				mgmt_new_settings_rsp, 4, true },
 	{ }
 };