Skip to content

Commit 05c55e1

Browse files
authored
Merge branch 'Jason2866:release/v5.2' into release/v5.2
2 parents 6a04f04 + 331b35a commit 05c55e1

File tree

30 files changed

+362
-147
lines changed

30 files changed

+362
-147
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5402,6 +5402,10 @@ void bta_dm_ble_scan (tBTA_DM_MSG *p_data)
54025402
status = (status == BTM_CMD_STARTED ? BTA_SUCCESS : BTA_FAILURE);
54035403
p_data->ble_scan.p_stop_scan_cback(status);
54045404
}
5405+
5406+
// reset BLE scan link state when stop scan
5407+
btm_ble_clear_topology_mask(BTM_BLE_STATE_ACTIVE_SCAN_BIT);
5408+
btm_ble_clear_topology_mask(BTM_BLE_STATE_PASSIVE_SCAN_BIT);
54055409
}
54065410
}
54075411

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
@@ -507,7 +507,15 @@ esp_err_t esp_mmu_map(esp_paddr_t paddr_start, size_t size, mmu_target_t target,
507507

508508
if (is_enclosed) {
509509
ESP_LOGW(TAG, "paddr block is mapped already, vaddr_start: %p, size: 0x%x", (void *)mem_block->vaddr_start, mem_block->size);
510-
*out_ptr = (void *)mem_block->vaddr_start;
510+
/*
511+
* This condition is triggered when `s_is_enclosed` is true and hence
512+
* we are sure that `paddr_start` >= `mem_block->paddr_start`.
513+
*
514+
* Add the offset of new physical address while returning the virtual
515+
* address.
516+
*/
517+
const uint32_t new_paddr_offset = paddr_start - mem_block->paddr_start;
518+
*out_ptr = (void *)mem_block->vaddr_start + new_paddr_offset;
511519
return ESP_ERR_INVALID_STATE;
512520
}
513521

components/esp_mm/include/esp_mmu_map.h

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2018-2024 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -41,6 +41,7 @@ typedef enum {
4141
* (29 - (BLE device name length) - 2). */
4242
#define MAX_BLE_MANUFACTURER_DATA_LEN 29
4343

44+
#define BLE_ADDR_LEN 6
4445
/**
4546
* @brief This structure maps handler required by protocomm layer to
4647
* UUIDs which are used to uniquely identify BLE characteristics
@@ -137,6 +138,10 @@ typedef struct protocomm_ble_config {
137138
*/
138139
unsigned ble_link_encryption:1;
139140

141+
/**
142+
* BLE address
143+
*/
144+
uint8_t *ble_addr;
140145
} protocomm_ble_config_t;
141146

142147
/**

0 commit comments

Comments
 (0)