diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-03-02 15:09:13 -0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-03-02 16:22:25 -0800 |
commit | f6441b238c9aff5b6b3bdc3fe865ba61706eb394 (patch) | |
tree | bce0c48c10f42e218c2d18847407e36e08231b1b /emulator | |
parent | 70e6a4a9064a8debf8881880b04e64ea281ea5f4 (diff) | |
download | bluez-f6441b238c9aff5b6b3bdc3fe865ba61706eb394.tar.gz |
btdev: Add support for Configure Data Path
> HCI Event: Command Complete (0x0e) plen 68
Read Local Supported Commands (0x04|0x0002) ncmd 1
Status: Success (0x00)
Commands: 169 entries
...
Configure Data Path (Octet 45 - Bit 5)
Diffstat (limited to 'emulator')
-rw-r--r-- | emulator/btdev.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/emulator/btdev.c b/emulator/btdev.c index 3d0d422b6..93c038e74 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -4677,6 +4677,20 @@ static int cmd_read_local_ctrl_delay(struct btdev *dev, const void *data, return 0; } +static int cmd_config_data_path(struct btdev *dev, const void *data, + uint8_t len) +{ + const struct bt_hci_cmd_config_data_path *cmd = data; + uint8_t status = BT_HCI_ERR_SUCCESS; + + if (cmd->id > 0x05) + status = BT_HCI_ERR_INVALID_PARAMETERS; + + cmd_complete(dev, BT_HCI_CMD_CONFIG_DATA_PATH, &status, sizeof(status)); + + return 0; +} + #define CMD_LE_52 \ CMD(BT_HCI_CMD_LE_READ_BUFFER_SIZE_V2, cmd_read_size_v2, NULL), \ CMD(BT_HCI_CMD_LE_READ_ISO_TX_SYNC, cmd_read_iso_tx_sync, NULL), \ @@ -4705,7 +4719,9 @@ static int cmd_read_local_ctrl_delay(struct btdev *dev, const void *data, CMD(BT_HCI_CMD_READ_LOCAL_CODECS_V2, cmd_read_local_codecs_v2, NULL), \ CMD(BT_HCI_CMD_READ_LOCAL_CODEC_CAPS, cmd_read_local_codec_caps, \ NULL), \ - CMD(BT_HCI_CMD_READ_LOCAL_CTRL_DELAY, cmd_read_local_ctrl_delay, NULL) + CMD(BT_HCI_CMD_READ_LOCAL_CTRL_DELAY, cmd_read_local_ctrl_delay, \ + NULL), \ + CMD(BT_HCI_CMD_CONFIG_DATA_PATH, cmd_config_data_path, NULL) static const struct btdev_cmd cmd_le_5_2[] = { CMD_COMMON_ALL, @@ -4742,6 +4758,7 @@ static void set_le_52_commands(struct btdev *btdev) btdev->commands[45] |= 0x04; /* Read Local Supported Codecs v2 */ btdev->commands[45] |= 0x08; /* Read Local Supported Codecs Caps */ btdev->commands[45] |= 0x10; /* Read Local Supported Ctrl Delay */ + btdev->commands[45] |= 0x20; /* Config Data Path */ btdev->cmds = cmd_le_5_2; } |