Commit 6c404279 authored by Vinayak Kariappa Chettimada's avatar Vinayak Kariappa Chettimada Committed by Fabio Baltieri
Browse files

Bluetooth: Host: Fix resolvable address update with Ext Adv enabled



Fix resolvable address update after RPA timeout with
Extended Advertising support enabled. As Extended
Advertising HCI Commands are being used to start legacy
advertising, incorrectly the local random address was being
used instead of using the random address populated in the
Extended Advertising set. BT_DEV_RPA_VALID is not cleared
when Extended Advertising HCI commands are used, hence the
local random address is not updated and the incorrect use
of it did not make any change to the advertising when
disabled and enabled at RPA timeout.

Signed-off-by: default avatarVinayak Kariappa Chettimada <vich@nordicsemi.no>
parent 0d4aa497
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -295,7 +295,9 @@ int bt_id_set_adv_private_addr(struct bt_le_ext_adv *adv)
		return 0;
	}

	if (adv == bt_le_adv_lookup_legacy() && adv->id == BT_ID_DEFAULT) {
	if (!(IS_ENABLED(CONFIG_BT_EXT_ADV) &&
	      BT_DEV_FEAT_LE_EXT_ADV(bt_dev.le.features)) &&
	    (adv == bt_le_adv_lookup_legacy()) && (adv->id == BT_ID_DEFAULT)) {
		/* Make sure that a Legacy advertiser using default ID has same
		 * RPA address as scanner roles.
		 */