From 348f12a2d3cdca7590a3ce26bc61032e86ee5d55 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 17 Dec 2014 14:50:57 +0200 Subject: [PATCH] emulator: Fix Write_LE_Host_Supported command sending --- emulator/bthost.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/emulator/bthost.c b/emulator/bthost.c index ef06c6035..22bff5480 100644 --- a/emulator/bthost.c +++ b/emulator/bthost.c @@ -2230,8 +2230,14 @@ void bthost_write_ssp_mode(struct bthost *bthost, uint8_t mode) void bthost_write_le_host_supported(struct bthost *bthost, uint8_t mode) { + struct bt_hci_cmd_write_le_host_supported cmd; + bthost->le = mode; - send_command(bthost, BT_HCI_CMD_WRITE_LE_HOST_SUPPORTED, &mode, 1); + + memset(&cmd, 0, sizeof(cmd)); + cmd.supported = mode; + send_command(bthost, BT_HCI_CMD_WRITE_LE_HOST_SUPPORTED, + &cmd, sizeof(cmd)); } void bthost_request_auth(struct bthost *bthost, uint16_t handle) -- 2.47.3