diff mbox series

[BlueZ,3/4] emulator: Add support for LE Set Host Feature

Message ID 20200421222521.226385-3-luiz.dentz@gmail.com (mailing list archive)
State New, archived
Headers show
Series [BlueZ,1/4] monitor: Remove use of base defines for 5.2 | expand

Commit Message

Luiz Augusto von Dentz April 21, 2020, 10:25 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 0de273e53..f9e1e6675 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -469,6 +469,7 @@  static void set_le_60_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_BREDRLE60)
+			goto unsupported;
+
+		status = BT_HCI_ERR_SUCCESS;
+		cmd_complete(btdev, opcode, &status, sizeof(status));
+
+		break;
+
 	default:
 		goto unsupported;
 	}