Diff between 70e6a4a9064a8debf8881880b04e64ea281ea5f4 and f6441b238c9aff5b6b3bdc3fe865ba61706eb394

Changed Files

File Additions Deletions Status
emulator/btdev.c +18 -1 modified

Full Patch

diff --git a/emulator/btdev.c b/emulator/btdev.c
index 3d0d422..93c038e 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;
 }