Bluetooth: host: Ignore failure to set passive scanner address
Ignore error when failing to set the passive scanner private address. This can happen because in between the time we checked if the advertiser was enabled and the time we execute the set random address command the state of the advertiser could have changed in the controller, and we only set the state once the command has completed in the controller. Fixes: #25672 Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
2cb4548a42
commit
f332d51d60
1 changed files with 7 additions and 1 deletions
|
@ -4124,7 +4124,13 @@ static int le_scan_set_random_addr(bool active_scan, uint8_t *own_addr_type)
|
|||
!is_adv_using_rand_addr()) {
|
||||
err = le_set_private_addr(BT_ID_DEFAULT);
|
||||
if (err) {
|
||||
if (active_scan || !is_adv_using_rand_addr()) {
|
||||
return err;
|
||||
} else {
|
||||
BT_WARN("Ignoring failure to set "
|
||||
"address for passive scan (%d)",
|
||||
err);
|
||||
}
|
||||
}
|
||||
|
||||
*own_addr_type = BT_ADDR_LE_RANDOM;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue