diff mbox series

[v2,4/6] emulator: Add support for LE Set Host Feature

Message ID 20200423215501.427266-4-luiz.dentz@gmail.com
State New
Headers show
Series None | expand

Commit Message

Luiz Augusto von Dentz April 23, 2020, 9:54 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This implements support for LE Set Host Feature
---
 emulator/btdev.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/emulator/btdev.c b/emulator/btdev.c
index fc2fb2065..cd355e73a 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -469,6 +469,7 @@  static void set_le_52_commands(struct btdev *btdev)
 	btdev->commands[43] |= 0x40;	/* LE ISO RX Test */
 	btdev->commands[43] |= 0x80;	/* LE ISO Read Test Counter */
 	btdev->commands[44] |= 0x01;	/* LE ISO Test End */
+	btdev->commands[44] |= 0x02;	/* LE ISO Set Host Feature */
 }
 
 static void set_le_commands(struct btdev *btdev)
@@ -3861,6 +3862,15 @@  static void default_cmd(struct btdev *btdev, uint16_t opcode,
 
 		break;
 
+	case BT_HCI_CMD_LE_SET_HOST_FEATURE:
+		if (btdev->type != BTDEV_TYPE_BREDRLE52)
+			goto unsupported;
+
+		status = BT_HCI_ERR_SUCCESS;
+		cmd_complete(btdev, opcode, &status, sizeof(status));
+
+		break;
+
 	default:
 		goto unsupported;
 	}