sm.c (b15d5cea352319fdf3b15b46b4ab21d01e83091d) sm.c (4f384501ec3adb6f6fb22c98dbaead99fb219f89)
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 4680 unchanged lines hidden (view full) ---

4689 // SC Only mode not possible without support for SC
4690 btstack_assert(enable == false);
4691#endif
4692}
4693
4694const uint8_t * gap_get_persistent_irk(void){
4695 return sm_persistent_irk;
4696}
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 4680 unchanged lines hidden (view full) ---

4689 // SC Only mode not possible without support for SC
4690 btstack_assert(enable == false);
4691#endif
4692}
4693
4694const uint8_t * gap_get_persistent_irk(void){
4695 return sm_persistent_irk;
4696}
4697
4698void gap_delete_bonding(bd_addr_type_t address_type, bd_addr_t address){
4699 uint16_t i;
4700 for (i=0; i < le_device_db_max_count(); i++){
4701 bd_addr_t entry_address;
4702 int entry_address_type = BD_ADDR_TYPE_UNKNOWN;
4703 le_device_db_info(i, &entry_address_type, entry_address, NULL);
4704 // skip unused entries
4705 if (entry_address_type == (int) BD_ADDR_TYPE_UNKNOWN) continue;
4706 if ((entry_address_type == (int) address_type) && (memcmp(entry_address, address, 6) == 0)){
4707#ifdef ENABLE_LE_PRIVACY_ADDRESS_RESOLUTION
4708 hci_remove_le_device_db_entry_from_resolving_list(i);
4709#endif
4710 le_device_db_remove(i);
4711 break;
4712 }
4713 }
4714}