summaryrefslogtreecommitdiff
path: root/emulator/le.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-02-28 15:09:55 -0800
committerMarcel Holtmann <marcel@holtmann.org>2014-02-28 15:09:55 -0800
commit53dde8be6cc9eec036d3a7a8f2e846bfa267d71b (patch)
tree37d247b2f1efb61da69f13a936efcd06713dbc68 /emulator/le.c
parent95db67e01f37f3e93640af44e7a0a3d2e595c074 (diff)
downloadbluez-53dde8be6cc9eec036d3a7a8f2e846bfa267d71b.tar.gz
emulator: Add dummy support for clearing the LE white list
Diffstat (limited to 'emulator/le.c')
-rw-r--r--emulator/le.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/emulator/le.c b/emulator/le.c
index 6738857db..3a4f64577 100644
--- a/emulator/le.c
+++ b/emulator/le.c
@@ -121,7 +121,7 @@ static void reset_defaults(struct bt_le *hci)
//hci->commands[26] |= 0x10; /* LE Create Connection */
//hci->commands[26] |= 0x20; /* LE Create Connection Cancel */
hci->commands[26] |= 0x40; /* LE Read White List Size */
- //hci->commands[26] |= 0x80; /* LE Clear White List */
+ hci->commands[26] |= 0x80; /* LE Clear White List */
//hci->commands[27] |= 0x01; /* LE Add Device To White List */
//hci->commands[27] |= 0x02; /* LE Remove Device From White List */
//hci->commands[27] |= 0x04; /* LE Connection Update */
@@ -579,6 +579,16 @@ static void cmd_le_read_white_list_size(struct bt_le *hci,
&rsp, sizeof(rsp));
}
+static void cmd_le_clear_white_list(struct bt_le *hci,
+ const void *data, uint8_t size)
+{
+ uint8_t status;
+
+ status = BT_HCI_ERR_SUCCESS;
+ cmd_complete(hci, BT_HCI_CMD_LE_CLEAR_WHITE_LIST,
+ &status, sizeof(status));
+}
+
static void cmd_le_encrypt(struct bt_le *hci, const void *data, uint8_t size)
{
const struct bt_hci_cmd_le_encrypt *cmd = data;
@@ -659,6 +669,8 @@ static const struct {
{ BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE,
cmd_le_read_white_list_size, 0, true },
+ { BT_HCI_CMD_LE_CLEAR_WHITE_LIST,
+ cmd_le_clear_white_list, 0, true },
{ BT_HCI_CMD_LE_ENCRYPT, cmd_le_encrypt, 32, true },
{ BT_HCI_CMD_LE_RAND, cmd_le_rand, 0, true },