diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2020-10-30 15:05:06 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2020-11-02 10:19:49 -0800 |
commit | 31eb3d670765dab8a148e25036c53d87efae36b7 (patch) | |
tree | a6a5489dea9497d0e36063451f68742de6453049 /emulator/bthost.c | |
parent | 2caa51ee5598e91f3e10bb8190fd72bb7374f5db (diff) | |
download | bluez-31eb3d670765dab8a148e25036c53d87efae36b7.tar.gz |
emulator/bthost: Add support for LE CIS Request
This enables bthost to act as acceptor of LE CIS Request.
Diffstat (limited to 'emulator/bthost.c')
-rw-r--r-- | emulator/bthost.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/emulator/bthost.c b/emulator/bthost.c index f5b09bc4f..32676e179 100644 --- a/emulator/bthost.c +++ b/emulator/bthost.c @@ -1269,6 +1269,21 @@ static void evt_le_ltk_request(struct bthost *bthost, const void *data, sizeof(cp)); } +static void evt_le_cis_req(struct bthost *bthost, const void *data, uint8_t len) +{ + const struct bt_hci_evt_le_cis_req *ev = data; + struct bt_hci_cmd_le_accept_cis cmd; + + if (len < sizeof(*ev)) + return; + + memset(&cmd, 0, sizeof(cmd)); + + cmd.handle = ev->cis_handle; + + send_command(bthost, BT_HCI_CMD_LE_ACCEPT_CIS, &cmd, sizeof(cmd)); +} + static void evt_le_meta_event(struct bthost *bthost, const void *data, uint8_t len) { @@ -1297,6 +1312,9 @@ static void evt_le_meta_event(struct bthost *bthost, const void *data, case BT_HCI_EVT_LE_ENHANCED_CONN_COMPLETE: evt_le_ext_conn_complete(bthost, evt_data, len - 1); break; + case BT_HCI_EVT_LE_CIS_REQ: + evt_le_cis_req(bthost, evt_data, len - 1); + break; default: util_debug(bthost->debug_callback, bthost->debug_data, "Unsupported LE Meta event 0x%2.2x", *event); |