Skip to content

Commit 2fbc7da

Browse files
authored
Merge branch 'Jason2866:release/v5.1' into release/v5.1
2 parents cb46c0f + ea17de7 commit 2fbc7da

File tree

29 files changed

+374
-180
lines changed

29 files changed

+374
-180
lines changed

components/bt/esp_ble_mesh/mesh_core/net.c

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/*
44
* SPDX-FileCopyrightText: 2017 Intel Corporation
5-
* SPDX-FileContributor: 2018-2023 Espressif Systems (Shanghai) CO LTD
5+
* SPDX-FileContributor: 2018-2024 Espressif Systems (Shanghai) CO LTD
66
*
77
* SPDX-License-Identifier: Apache-2.0
88
*/
@@ -967,18 +967,36 @@ int bt_mesh_net_send(struct bt_mesh_net_tx *tx, struct net_buf *buf,
967967
}
968968

969969
/* Deliver to local network interface if necessary */
970-
if (IS_ENABLED(CONFIG_BLE_MESH_NODE) && bt_mesh_is_provisioned() &&
971-
(bt_mesh_fixed_group_match(tx->ctx->addr) ||
972-
bt_mesh_elem_find(tx->ctx->addr))) {
973-
if (cb && cb->start) {
974-
cb->start(0, 0, cb_data);
975-
}
976-
net_buf_slist_put(&bt_mesh.local_queue, net_buf_ref(buf));
977-
if (cb && cb->end) {
978-
cb->end(0, cb_data);
970+
if (((IS_ENABLED(CONFIG_BLE_MESH_NODE) && bt_mesh_is_provisioned()) ||
971+
(IS_ENABLED(CONFIG_BLE_MESH_PROVISIONER) && bt_mesh_is_provisioner_en())) &&
972+
(bt_mesh_fixed_group_match(tx->ctx->addr) || bt_mesh_elem_find(tx->ctx->addr))) {
973+
/**
974+
* If the target address isn't a unicast address, then the callback function
975+
* will be called by `adv task` in place of here, to avoid the callback function
976+
* being called twice.
977+
* See BLEMESH24-76 for more details.
978+
*/
979+
if (BLE_MESH_ADDR_IS_UNICAST(tx->ctx->addr)) {
980+
if (cb && cb->start) {
981+
cb->start(0, 0, cb_data);
982+
}
983+
984+
net_buf_slist_put(&bt_mesh.local_queue, net_buf_ref(buf));
985+
986+
if (cb && cb->end) {
987+
cb->end(0, cb_data);
988+
}
989+
990+
k_work_submit(&bt_mesh.local_work);
991+
992+
goto done;
993+
} else {
994+
net_buf_slist_put(&bt_mesh.local_queue, net_buf_ref(buf));
995+
k_work_submit(&bt_mesh.local_work);
979996
}
980-
k_work_submit(&bt_mesh.local_work);
981-
} else if (tx->ctx->send_ttl != 1U) {
997+
}
998+
999+
if (tx->ctx->send_ttl != 1U) {
9821000
/* Deliver to the advertising network interface. Mesh spec
9831001
* 3.4.5.2: "The output filter of the interface connected to
9841002
* advertising or GATT bearers shall drop all messages with

components/bt/host/bluedroid/bta/dm/bta_dm_act.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5332,6 +5332,10 @@ void bta_dm_ble_scan (tBTA_DM_MSG *p_data)
53325332
status = (status == BTM_CMD_STARTED ? BTA_SUCCESS : BTA_FAILURE);
53335333
p_data->ble_scan.p_stop_scan_cback(status);
53345334
}
5335+
5336+
// reset BLE scan link state when stop scan
5337+
btm_ble_clear_topology_mask(BTM_BLE_STATE_ACTIVE_SCAN_BIT);
5338+
btm_ble_clear_topology_mask(BTM_BLE_STATE_PASSIVE_SCAN_BIT);
53355339
}
53365340
}
53375341

components/bt/host/bluedroid/stack/btm/btm_ble_gap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4009,6 +4009,9 @@ static void btm_ble_stop_discover(void)
40094009
if(btsnd_hcic_ble_set_scan_enable (BTM_BLE_SCAN_DISABLE, BTM_BLE_DUPLICATE_ENABLE)) {
40104010
osi_sem_take(&scan_enable_sem, OSI_SEM_MAX_TIMEOUT);
40114011
}
4012+
/* reset status */
4013+
btm_ble_clear_topology_mask(BTM_BLE_STATE_ACTIVE_SCAN_BIT);
4014+
btm_ble_clear_topology_mask(BTM_BLE_STATE_PASSIVE_SCAN_BIT);
40124015
}
40134016

40144017
if (p_scan_cb) {

components/esp_mm/esp_mmu_map.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,15 @@ esp_err_t esp_mmu_map(esp_paddr_t paddr_start, size_t size, mmu_target_t target,
493493

494494
if (is_enclosed) {
495495
ESP_LOGW(TAG, "paddr block is mapped already, vaddr_start: %p, size: 0x%x", (void *)mem_block->vaddr_start, mem_block->size);
496-
*out_ptr = (void *)mem_block->vaddr_start;
496+
/*
497+
* This condition is triggered when `s_is_enclosed` is true and hence
498+
* we are sure that `paddr_start` >= `mem_block->paddr_start`.
499+
*
500+
* Add the offset of new physical address while returning the virtual
501+
* address.
502+
*/
503+
const uint32_t new_paddr_offset = paddr_start - mem_block->paddr_start;
504+
*out_ptr = (void *)mem_block->vaddr_start + new_paddr_offset;
497505
return ESP_ERR_INVALID_STATE;
498506
}
499507

components/esp_mm/include/esp_mmu_map.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ typedef uint32_t esp_paddr_t;
7676
* - ESP_ERR_NOT_SUPPORTED: Only on ESP32, PSRAM is not a supported physical memory target
7777
* - ESP_ERR_NOT_FOUND: No enough size free block to use
7878
* - ESP_ERR_NO_MEM: Out of memory, this API will allocate some heap memory for internal usage
79-
* - ESP_ERR_INVALID_STATE: Paddr is mapped already, this API will return corresponding vaddr_start of the previously mapped block.
79+
* - ESP_ERR_INVALID_STATE: Paddr is mapped already, this API will return corresponding `vaddr_start + new_block_offset` as per the previously mapped block.
8080
* Only to-be-mapped paddr block is totally enclosed by a previously mapped block will lead to this error. (Identical scenario will behave similarly)
8181
* new_block_start new_block_end
8282
* |-------- New Block --------|

components/esp_rom/esp32c3/ld/esp32c3.rom.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ r_lld_con_pref_slave_evt_dur_set = 0x400010f0;
10361036
r_lld_con_pref_slave_latency_set = 0x400010f4;
10371037
r_lld_con_rssi_get = 0x400010f8;
10381038
r_lld_con_rx = 0x400010fc;
1039-
r_lld_con_rx_channel_assess = 0x40001100;
1039+
/* r_lld_con_rx_channel_assess = 0x40001100; */
10401040
r_lld_con_rx_enc = 0x40001104;
10411041
r_lld_con_rx_isr = 0x40001108;
10421042
r_lld_con_rx_link_info_check = 0x4000110c;

components/esp_rom/esp32s3/ld/esp32s3.rom.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ r_lld_con_pref_slave_evt_dur_set = 0x400042b4;
13091309
r_lld_con_pref_slave_latency_set = 0x400042c0;
13101310
r_lld_con_rssi_get = 0x400042cc;
13111311
r_lld_con_rx = 0x400042d8;
1312-
r_lld_con_rx_channel_assess = 0x400042e4;
1312+
/* r_lld_con_rx_channel_assess = 0x400042e4; */
13131313
r_lld_con_rx_enc = 0x400042f0;
13141314
r_lld_con_rx_isr = 0x400042fc;
13151315
r_lld_con_rx_link_info_check = 0x40004308;

components/esp_wifi/include/esp_wifi.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,20 +249,36 @@ extern const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
249249
#define WIFI_ENABLE_GMAC 0
250250
#endif
251251

252+
#if CONFIG_ESP_WIFI_11R_SUPPORT
253+
#define WIFI_ENABLE_11R (1<<6)
254+
#else
255+
#define WIFI_ENABLE_11R 0
256+
#endif
257+
258+
#if CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT
259+
#define WIFI_ENABLE_ENTERPRISE (1<<7)
260+
#else
261+
#define WIFI_ENABLE_ENTERPRISE 0
262+
#endif
263+
252264
#define CONFIG_FEATURE_WPA3_SAE_BIT (1<<0)
253265
#define CONFIG_FEATURE_CACHE_TX_BUF_BIT (1<<1)
254266
#define CONFIG_FEATURE_FTM_INITIATOR_BIT (1<<2)
255267
#define CONFIG_FEATURE_FTM_RESPONDER_BIT (1<<3)
256268
#define CONFIG_FEATURE_GCMP_BIT (1<<4)
257269
#define CONFIG_FEATURE_GMAC_BIT (1<<5)
270+
#define CONFIG_FEATURE_11R_BIT (1<<6)
271+
#define CONFIG_FEATURE_WIFI_ENT_BIT (1<<7)
258272

259273
/* Set additional WiFi features and capabilities */
260274
#define WIFI_FEATURE_CAPS (WIFI_ENABLE_WPA3_SAE | \
261275
WIFI_ENABLE_SPIRAM | \
262276
WIFI_FTM_INITIATOR | \
263277
WIFI_FTM_RESPONDER | \
264278
WIFI_ENABLE_GCMP | \
265-
WIFI_ENABLE_GMAC)
279+
WIFI_ENABLE_GMAC | \
280+
WIFI_ENABLE_11R | \
281+
WIFI_ENABLE_ENTERPRISE)
266282

267283
#define WIFI_INIT_CONFIG_DEFAULT() { \
268284
.osi_funcs = &g_wifi_osi_funcs, \

0 commit comments

Comments
 (0)