Bluetooth: host: Update id.c to support id rst/del for CONFIG_BT_SMP=n
Currently calls to these two functions fail unnecessarily when CONFIG_BT_SMP is disabled. This fix allows identity resets without having the BT_SMP stack enabled. The primary use case is enabling random mac address rotation for privacy in memory constrained SOCs. Fixes #73313 Signed-off-by: Patrick Patel <ppatel@micro-design.com>
This commit is contained in:
parent
7d7616214b
commit
131a0fad04
1 changed files with 2 additions and 2 deletions
|
@ -1415,7 +1415,7 @@ int bt_id_reset(uint8_t id, bt_addr_le_t *addr, uint8_t *irk)
|
|||
}
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_CONN) &&
|
||||
if (IS_ENABLED(CONFIG_BT_SMP) &&
|
||||
!bt_addr_le_eq(&bt_dev.id_addr[id], BT_ADDR_LE_ANY)) {
|
||||
err = bt_unpair(id, NULL);
|
||||
if (err) {
|
||||
|
@ -1453,7 +1453,7 @@ int bt_id_delete(uint8_t id)
|
|||
}
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_CONN)) {
|
||||
if (IS_ENABLED(CONFIG_BT_SMP)) {
|
||||
int err;
|
||||
|
||||
err = bt_unpair(id, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue