From b446ed8e8c87b051af72c84877e2f34fcd47ca0d 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. --- emulator/btdev.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emulator/btdev.c b/emulator/btdev.c index f02103f0e..582650049 100644 --- 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.47.3