Merge branch 'fix/ble_mesh_ble_50_bug' into 'master'

fix(ble_mesh): compile bug fixed for ble mesh on ble 5.0

Closes BLERP-1359

See merge request espressif/esp-idf!35554
This commit is contained in:
Island
2024-12-12 10:53:39 +08:00
2 changed files with 3 additions and 3 deletions

View File

@@ -656,7 +656,8 @@ int bt_le_ext_adv_start(const uint8_t inst_id,
* not smaller than 10ms, then we will use a random adv interval between
* [interval / 2, interval] for them.
*/
if (adv_type == BLE_MESH_ADV_NONCONN_IND && interval >= 16) {
if (ext_adv_params.type == BTA_DM_BLE_GAP_SET_EXT_ADV_PROP_LEGACY_NONCONN
&& interval >= 16) {
interval >>= 1;
interval += (bt_mesh_get_rand() % (interval + 1));

View File

@@ -1207,8 +1207,7 @@ int bt_le_ext_adv_start(const uint8_t inst_id,
* not smaller than 10ms, then we will use a random adv interval between
* [interval / 2, interval] for them.
*/
if (adv_params.conn_mode == BLE_GAP_CONN_MODE_NON &&
adv_params.disc_mode == BLE_GAP_DISC_MODE_NON && interval >= 16) {
if (adv_params.legacy_pdu && interval >= 16) {
interval >>= 1;
interval += (bt_mesh_get_rand() % (interval + 1));