Bluetooth: Controller: Add HCI_LE_Remove_Device_From_White_List
Add implementation in HCI and Controller to support HCI_LE_Remove_Device_From_White_List, as it is listed as mandatory under BT Spec. v4.2, Part E, Section 3.19 LE Controller Requirements. Change-id: Icef88dffc85746f3cc7adb7fb692ae5578274ed2 Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
This commit is contained in:
parent
c73aee2cfe
commit
5629197b17
3 changed files with 42 additions and 2 deletions
|
@ -6320,6 +6320,30 @@ uint32_t radio_filter_add(uint8_t addr_type, uint8_t *addr)
|
|||
return 1;
|
||||
}
|
||||
|
||||
uint32_t radio_filter_remove(uint8_t addr_type, uint8_t *addr)
|
||||
{
|
||||
uint8_t index;
|
||||
|
||||
if (!_radio.filter_enable_bitmask) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
index = 8;
|
||||
while (index--) {
|
||||
if ((_radio.filter_enable_bitmask & BIT(index)) &&
|
||||
(((_radio.filter_addr_type_bitmask >> index) & 0x01) ==
|
||||
(addr_type & 0x01)) &&
|
||||
!memcmp(_radio.filter_bdaddr[index], addr, BDADDR_SIZE)) {
|
||||
_radio.filter_enable_bitmask &= ~BIT(index);
|
||||
_radio.filter_addr_type_bitmask &= ~BIT(index);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void radio_irk_clear(void)
|
||||
{
|
||||
_radio.nirk = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue