Bluetooth: host: always set address via HCI before scanning

The address of the device is also set via HCI interface when passive
scanning is used. As a result, LL does not filter out directed
advertising packets that are targeted at this device.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
This commit is contained in:
Kamil Piszczek 2018-09-25 11:15:39 +02:00 committed by Johan Hedberg
commit 868a3bff0d

View file

@ -3114,6 +3114,8 @@ static int start_le_scan(u8_t scan_type, u16_t interval, u16_t window)
}
set_param.addr_type = BT_ADDR_LE_RANDOM;
} else if (set_param.addr_type == BT_ADDR_LE_RANDOM) {
set_random_address(&bt_dev.id_addr[0].a);
}
}