From 52921124202f96d6ab8e5ec93eace4c41bc06776 Mon Sep 17 00:00:00 2001 From: Arun Kumar Singh Date: Mon, 28 Feb 2011 15:18:54 -0300 Subject: hcitool: Add command to clear LE White List --- lib/hci.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'lib/hci.c') diff --git a/lib/hci.c b/lib/hci.c index 9184e0950..02fc0cf2a 100644 --- a/lib/hci.c +++ b/lib/hci.c @@ -1376,6 +1376,28 @@ int hci_le_read_white_list_size(int dd, uint8_t *size, int to) return 0; } +int hci_le_clear_white_list(int dd, int to) +{ + struct hci_request rq; + uint8_t status; + + memset(&rq, 0, sizeof(rq)); + rq.ogf = OGF_LE_CTL; + rq.ocf = OCF_LE_CLEAR_WHITE_LIST; + rq.rparam = &status; + rq.rlen = 1; + + if (hci_send_req(dd, &rq, to) < 0) + return -1; + + if (status) { + errno = EIO; + return -1; + } + + return 0; +} + int hci_read_local_name(int dd, int len, char *name, int to) { read_local_name_rp rp; -- cgit v1.2.1