Skip to content

Commit 196e6a0

Browse files
m-alperen-senernordicjm
authored andcommitted
[nrf fromtree] bluetooth: host: Add missing pending IRK update call for ext adv start
Adds IRK update call to internal bt_le_adv_start_ext. And rename it to adv_start_ext to prevent confusion with public functions. There are two paths to start ext advertising: - bt_le_adv_start can start extended advertising if enabled by calling internal bt_le_adv_start_ext else it starts legacy advertisements. - bt_le_ext_adv_start specifically starts extended advertisements. This commit misses the first path for ext advertisement: 6d137ae Signed-off-by: Alperen Sener <alperen.sener@nordicsemi.no> (cherry picked from commit 246050f)
1 parent dec3a19 commit 196e6a0

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • subsys/bluetooth/host

subsys/bluetooth/host/adv.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ static int le_ext_adv_param_set(struct bt_le_ext_adv *adv,
12191219
return 0;
12201220
}
12211221

1222-
int bt_le_adv_start_ext(struct bt_le_ext_adv *adv,
1222+
static int adv_start_ext(struct bt_le_ext_adv *adv,
12231223
const struct bt_le_adv_param *param,
12241224
const struct bt_data *ad, size_t ad_len,
12251225
const struct bt_data *sd, size_t sd_len)
@@ -1244,6 +1244,10 @@ int bt_le_adv_start_ext(struct bt_le_ext_adv *adv,
12441244
return -EALREADY;
12451245
}
12461246

1247+
if (IS_ENABLED(CONFIG_BT_SMP) && atomic_test_bit(bt_dev.flags, BT_DEV_ID_PENDING)) {
1248+
bt_id_pending_keys_update();
1249+
}
1250+
12471251
adv->id = param->id;
12481252

12491253
if (IS_ENABLED(CONFIG_BT_ID_AUTO_SWAP_MATCHING_BONDS)) {
@@ -1327,7 +1331,7 @@ int bt_le_adv_start(const struct bt_le_adv_param *param,
13271331

13281332
if (IS_ENABLED(CONFIG_BT_EXT_ADV) &&
13291333
BT_DEV_FEAT_LE_EXT_ADV(bt_dev.le.features)) {
1330-
err = bt_le_adv_start_ext(adv, param, ad, ad_len, sd, sd_len);
1334+
err = adv_start_ext(adv, param, ad, ad_len, sd, sd_len);
13311335
} else {
13321336
err = adv_start_legacy(adv, param, ad, ad_len, sd, sd_len);
13331337
}

0 commit comments

Comments
 (0)