Bluetooth: Host: Fix RPA timer not running

The RPA timer should always be running, even with privacy supported by
the controller. In order to select an IRK to generate the private
the controller is instructed by provided an identity address.
If we want to advertise privately without providing an identity address
the host has to set the private address.

Fixes: #18150

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
Joakim Andersson 2019-08-14 16:04:22 +02:00 committed by Carles Cufí
commit d94da73a19

View file

@ -874,8 +874,7 @@ static void hci_disconn_complete(struct net_buf *buf)
advertise:
if (atomic_test_bit(bt_dev.flags, BT_DEV_KEEP_ADVERTISING) &&
!atomic_test_bit(bt_dev.flags, BT_DEV_ADVERTISING)) {
if (IS_ENABLED(CONFIG_BT_PRIVACY) &&
!BT_FEAT_LE_PRIVACY(bt_dev.le.features)) {
if (IS_ENABLED(CONFIG_BT_PRIVACY)) {
le_set_private_addr(bt_dev.adv_id);
}