Add support for Remove Advertisement Monitor MGMT command and event. @ MGMT Command: Remove Advertisement Monitor (0x0053) plen 2 Handle: 1 @ MGMT Event: Advertisement Monitor Added (0x002c) plen 2 Handle: 1 @ MGMT Event: Command Complete (0x0001) plen 5 Remove Advertisement Monitor (0x0053) plen 2 Status: Success (0x00) Handle: 1 Reviewed-by: Miao-chen Chou <mcchou@xxxxxxxxxxxx> --- monitor/packet.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/monitor/packet.c b/monitor/packet.c index b3a6ed24d5fc..dcbed9f0f287 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -13232,6 +13232,22 @@ static void mgmt_add_adv_monitor_patterns_rsp(const void *data, uint16_t size) print_field("Handle: %d", handle); } +static void mgmt_remove_adv_monitor_patterns_cmd(const void *data, + uint16_t size) +{ + uint16_t handle = get_le16(data); + + print_field("Handle: %d", handle); +} + +static void mgmt_remove_adv_monitor_patterns_rsp(const void *data, + uint16_t size) +{ + uint16_t handle = get_le16(data); + + print_field("Handle: %d", handle); +} + struct mgmt_data { uint16_t opcode; const char *str; @@ -13469,6 +13485,9 @@ static const struct mgmt_data mgmt_command_table[] = { { 0x0052, "Add Advertisement Monitor", mgmt_add_adv_monitor_patterns_cmd, 1, false, mgmt_add_adv_monitor_patterns_rsp, 2, true}, + { 0x0053, "Remove Advertisement Monitor", + mgmt_remove_adv_monitor_patterns_cmd, 2, true, + mgmt_remove_adv_monitor_patterns_rsp, 2, true}, { } }; @@ -13880,6 +13899,13 @@ static void mgmt_adv_monitor_added_evt(const void *data, uint16_t size) print_field("Handle: %d", handle); } +static void mgmt_adv_monitor_removed_evt(const void *data, uint16_t size) +{ + uint16_t handle = get_le16(data); + + print_field("Handle: %d", handle); +} + static void mgmt_controller_suspend_evt(const void *data, uint16_t size) { uint8_t state = get_u8(data); @@ -14011,6 +14037,8 @@ static const struct mgmt_data mgmt_event_table[] = { mgmt_device_flags_changed_evt, 15, true }, { 0x002b, "Advertisement Monitor Added", mgmt_adv_monitor_added_evt, 2, true }, + { 0x002c, "Advertisement Monitor Added", + mgmt_adv_monitor_removed_evt, 2, true }, { 0x002d, "Controller Suspended", mgmt_controller_suspend_evt, 1, true }, { 0x002e, "Controller Resumed", -- 2.29.1.341.ge80a0c044ae-goog