From d981c0c157e56b397151f72c083236c42a64b14f Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 7 Dec 2020 17:06:51 -0800 Subject: [PATCH] btdev: Fix not handling BT_HCI_CMD_HOST_NUM_COMPLETED_PACKETS System such as Zephyr do use BT_HCI_CMD_HOST_NUM_COMPLETED_PACKETS since BT_HCI_CMD_SET_HOST_FLOW_CONTROL is also supported. Signed-off-by: Anuj Jain Signed-off-by: Ayush Garg --- emulator/btdev.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emulator/btdev.c b/emulator/btdev.c index f02103f..5826500 100755 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -617,6 +617,15 @@ static int cmd_host_buffer_size(struct btdev *dev, const void *data, return 0; } +static int cmd_host_num_completed_pkts(struct btdev *dev, const void *data, + uint8_t len) +{ + /* This command is special in the sense that no event is + * normally generated after the command has completed. + */ + return 0; +} + static int cmd_read_bdaddr(struct btdev *dev, const void *data, uint8_t len) { struct bt_hci_rsp_read_bd_addr rsp; @@ -637,6 +646,8 @@ static int cmd_read_bdaddr(struct btdev *dev, const void *data, uint8_t len) cmd_remote_version_complete), \ CMD(BT_HCI_CMD_SET_HOST_FLOW_CONTROL, cmd_set_host_flowctl, NULL), \ CMD(BT_HCI_CMD_HOST_BUFFER_SIZE, cmd_host_buffer_size, NULL), \ + CMD(BT_HCI_CMD_HOST_NUM_COMPLETED_PACKETS, \ + cmd_host_num_completed_pkts, NULL), \ CMD(BT_HCI_CMD_READ_BD_ADDR, cmd_read_bdaddr, NULL) static void set_common_commands_bredrle(struct btdev *btdev) -- 2.7.4