2020-04-21 22:26:15

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: [PATCH BlueZ 3/4] emulator: Add support for LE Set Host Feature

From: Luiz Augusto von Dentz <[email protected]>

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

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;
}
--
2.25.3