summaryrefslogtreecommitdiff
path: root/emulator
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-05-19 11:00:51 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2015-05-19 11:07:37 +0300
commit5f5094dc554825ddd99d475301d3bc5051f8da4d (patch)
tree617d8e518ddab5a723a2ad599b157c7098722d2d /emulator
parente66c163290dcd7dc9c1a935cda525ab77192753c (diff)
downloadbluez-5f5094dc554825ddd99d475301d3bc5051f8da4d.tar.gz
emulator: Pretend to support host flow control command
Diffstat (limited to 'emulator')
-rw-r--r--emulator/btdev.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/emulator/btdev.c b/emulator/btdev.c
index d9e38b596..2f6ba3137 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -121,6 +121,7 @@ struct btdev {
uint8_t simple_pairing_mode;
uint8_t ssp_debug_mode;
uint8_t secure_conn_support;
+ uint8_t host_flow_control;
uint8_t le_supported;
uint8_t le_simultaneous;
uint8_t le_event_mask[8];
@@ -320,6 +321,7 @@ static void set_common_commands_bredrle(struct btdev *btdev)
{
btdev->commands[0] |= 0x20; /* Disconnect */
btdev->commands[2] |= 0x80; /* Read Remote Version Information */
+ btdev->commands[10] |= 0x20; /* Set Host Flow Control */
btdev->commands[10] |= 0x40; /* Host Buffer Size */
btdev->commands[15] |= 0x02; /* Read BD ADDR */
}
@@ -1928,6 +1930,7 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
const struct bt_hci_cmd_write_auth_enable *wae;
const struct bt_hci_cmd_write_class_of_dev *wcod;
const struct bt_hci_cmd_write_voice_setting *wvs;
+ const struct bt_hci_cmd_set_host_flow_control *shfc;
const struct bt_hci_cmd_write_inquiry_mode *wim;
const struct bt_hci_cmd_write_afh_assessment_mode *waam;
const struct bt_hci_cmd_write_ext_inquiry_response *weir;
@@ -2377,6 +2380,13 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
cmd_complete(btdev, opcode, &status, sizeof(status));
break;
+ case BT_HCI_CMD_SET_HOST_FLOW_CONTROL:
+ shfc = data;
+ btdev->host_flow_control = shfc->enable;
+ status = BT_HCI_ERR_SUCCESS;
+ cmd_complete(btdev, opcode, &status, sizeof(status));
+ break;
+
case BT_HCI_CMD_READ_NUM_SUPPORTED_IAC:
if (btdev->type == BTDEV_TYPE_LE)
goto unsupported;