From 5f10154724084bbfc634117c6f1873afd0190532 Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Tue, 10 Dec 2019 17:09:07 +0530 Subject: [PATCH] Bluetooth: controller: split: Fix HCI LE Add Device to Whitelist According to BT Spec v5.1 Vol 2 Part E Section 7.8.16, if the device is already in the White List, the controller should not add the device to the White List and should return success. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/ull_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/controller/ll_sw/ull_filter.c b/subsys/bluetooth/controller/ll_sw/ull_filter.c index 4a05e6e19c1..41e6b84ae76 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_filter.c +++ b/subsys/bluetooth/controller/ll_sw/ull_filter.c @@ -785,7 +785,7 @@ static u32_t wl_add(bt_addr_le_t *id_addr) /* Duplicate check */ if (i < ARRAY_SIZE(wl)) { - return BT_HCI_ERR_INVALID_PARAM; + return 0; } else if (j >= ARRAY_SIZE(wl)) { return BT_HCI_ERR_MEM_CAPACITY_EXCEEDED; }