Commit Graph

9516 Commits

Author SHA1 Message Date
Wang Meng Yang
12dddeb160 Merge branch 'bugfix/spp_vfs_mode_send_data_fail_v4.1' into 'release/v4.1'
bt: Fixed SPP VFS mode not being able to send data(v4.1)

See merge request espressif/esp-idf!20800
2022-10-27 10:50:09 +08:00
Jiang Jiang Jian
b308c5b676 Merge branch 'bugfix/build_wifi_lib_with_Os_v4.1' into 'release/v4.1'
esp_wifi: build wifi lib with -Os optimization (Backport v4.1)

See merge request espressif/esp-idf!20777
2022-10-27 10:43:04 +08:00
Wang Meng Yang
e9ded8fdec Merge branch 'bugfix/handle_issue_of_malloc_fail_v4.1' into 'release/v4.1'
bugfix/avoid unexpected free when malloc failed (v4.1)

See merge request espressif/esp-idf!20724
2022-10-26 18:57:32 +08:00
xiongweichao
c346cd4e9f bt: Fixed SPP VFS mode not being able to send data 2022-10-26 16:20:03 +08:00
Jiang Jiang Jian
8da39d82ca Merge branch 'bugfix/fix_esp32_some_bugs_v4.1' into 'release/v4.1'
Fixed BLE ASSERT_PARAM(32 0) in rwble.c at line 384 on ESP32(backport v4.1)

See merge request espressif/esp-idf!20764
2022-10-26 10:55:58 +08:00
Jiang Jiang Jian
af9e3e827f Merge branch 'bugfix/update_ctrl_init_config_macro_v4.1' into 'release/v4.1'
Bugfix/update ctrl init config macro (v4.1)

See merge request espressif/esp-idf!20715
2022-10-25 17:41:28 +08:00
zhangyanjiao
a2997a92de esp_wifi: build wifi lib with -Os optimization 2022-10-25 17:01:19 +08:00
zhiweijian
901828c1d8 Fixed ESP32 BLE assert(32 0) 2022-10-25 11:54:00 +08:00
zwj
5ab210b986 allow bluedroid host to report adv_ind separately 2022-10-25 11:53:49 +08:00
Jiang Jiang Jian
7d9b0b456c Merge branch 'bugfix/fix_legacy_pair_not_send_link_key_host_v4.1' into 'release/v4.1'
component_bt: fix legacy pair controller does not send the link key to the host (v4.1)

See merge request espressif/esp-idf!19324
2022-10-24 13:58:31 +08:00
Jiang Jiang Jian
5fbc8774b6 Merge branch 'bugfix/esp_spp_write_len_0_v4.1' into 'release/v4.1'
bt: Fixed esp_spp_write() crash when len is 0 (v4.1)

See merge request espressif/esp-idf!20709
2022-10-24 12:31:22 +08:00
xiongweichao
08282760be fix legacy pair controller does not send the link key to the host
Closes https://github.com/espressif/esp-idf/issues/5850
2022-10-24 04:29:36 +00:00
muhaidong
20294ff1f0 esp_wifi: fix some wifi bugs
1. fix pairwise cipher tkip pmf compability issue
2. compute packet length use lldesc length instead rx_ctl sig_len for sniffer
3. refactor WiFi ioctl function
2022-10-21 17:48:22 +08:00
tgotic
f738750ae6 [bt] fix if allocation fails
If osi_malloc fails for work_queues or osi_work_queue_create fails, osi_work_queue_delete in _err may release unallocated memory.
2022-10-21 14:59:04 +08:00
Jin Cheng
3f27363753 Corrects header names in string from "bt.h" to "esp_bt.h". 2022-10-21 13:15:44 +08:00
xiongweichao
65d3c54c19 bt: Fixed esp_spp_write() crash when len is 0
Closes https://github.com/espressif/esp-idf/issues/9977
2022-10-21 11:33:37 +08:00
Jiang Jiang Jian
0736faff89 Merge branch 'bugfix/fix_sta_scan_when_already_connected_v4.1' into 'release/v4.1'
esp-wifi: Restores station status to connected when no other AP is found for roam

See merge request espressif/esp-idf!20391
2022-10-21 10:46:35 +08:00
Jiang Jiang Jian
bbfca2c729 Merge branch 'bugfix/revert_commit_da44fc9c_v4.1' into 'release/v4.1'
Revert "fixed the issue iOS devices cannot initiate connection" (v4.1)

See merge request espressif/esp-idf!20669
2022-10-20 19:19:04 +08:00
Island
e51646aff0 Merge branch 'feature/Add_IVI_recovery_option_v4.1' into 'release/v4.1'
ble_mesh: stack: Add IV index recovery option when device missed the whole IV update(v4.1)

See merge request espressif/esp-idf!20645
2022-10-20 16:43:03 +08:00
Island
3ab621c0a3 Merge branch 'bugfix/fix_fast_interval_prov_adv_v4.1' into 'release/v4.1'
ble_mesh: stack: Fix send fast interval prov_adv failed(v4.1)

See merge request espressif/esp-idf!20636
2022-10-20 16:42:11 +08:00
Jin Cheng
87ca734e48 Revert "fixed the issue iOS devices cannot initiate connection"
This reverts commit da44fc9cbe.
2022-10-18 19:46:19 +08:00
Michael (XIAO Xufeng)
3f09c2abc9 bootloader: support unlock MXIC flash chips 2022-10-17 19:15:25 +08:00
Cao Sen Miao
dda13f88ea spi_flash: move the unlock patch to bootloader and add support for GD 2022-10-17 19:15:25 +08:00
Michael (XIAO Xufeng)
fa18296c32 spi_flash: fix the corruption of ROM after calling bootloader_execute_flash_command
The user register, especially dummy related ones, needs to be restored, otherwise the ROM function will not work.

Introduced in dd40123129.
2022-10-17 19:15:25 +08:00
Michael (XIAO Xufeng)
bab633cf9e bootloader: add xmc spi_flash startup flow to improve reliability 2022-10-17 19:15:25 +08:00
Michael (XIAO Xufeng)
eba6f019ef bootloader: create public bootloader_flash.h header
Move non-public functions into bootloader_flash_priv.h header
2022-10-17 19:15:25 +08:00
Michael (XIAO Xufeng)
d2f9113d14 bootloader: fix the WRSR format for ISSI flash chips
1. The 2nd bootloader always call `rom_spiflash_unlock()`, but never help to clear the WEL bit when exit. This may cause system unstability.

   This commit helps to clear WEL when flash configuration is done.

   **RISK:** When the app starts, it didn't have to clear the WEL before it actually write/erase. But now the very first write/erase operation should be done after a WEL clear. Though the risk is little (all the following write/erase also need to clear the WEL), we still have to test this carefully, especially for those functions used by the OTA.

2. The `rom_spiflash_unlock()` function in the patch of ESP32 may (1) trigger the QPI, (2) clear the QE or (3) fail to unlock the ISSI chips.

   Status register bitmap of ISSI chip and GD chip:

| SR | ISSI | GD25LQ32C |
| -- | ---- | --------- |
| 0  | WIP  | WIP       |
| 1  | WEL  | WEL       |
| 2  | BP0  | BP0       |
| 3  | BP1  | BP1       |
| 4  | BP2  | BP2       |
| 5  | BP3  | BP3       |
| 6  | QE   | BP4       |
| 7  | SRWD | SRP0      |
| 8  |      | SRP1      |
| 9  |      | QE        |
| 10 |      | SUS2      |
| 11 |      | LB1       |
| 12 |      | LB2       |
| 13 |      | LB3       |
| 14 |      | CMP       |
| 15 |      | SUS1      |

   QE bit of other chips are at the bit 9 of the status register (i.e. bit 1 of SR2), which should be read by RDSR2 command.

   However, the RDSR2 (35H, Read Status 2) command for chip of other vendors happens to be the QIOEN (Enter QPI mode) command of ISSI chips. When the `rom_spiflash_unlock()` function trys to read SR2, it may trigger the QPI of ISSI chips.

   Moreover, when `rom_spiflash_unlock()` try to clear the BP4 bit in the status register, QE (bit 6) of ISSI chip may be cleared by accident. Or if the ISSI chip doesn't accept WRSR command with argument of two bytes (since it only have status register of one byte), it may fail to clear the other protect bits (BP0~BP3) as expected.

   This commit makes the `rom_spiflash_unlock()` check whether the vendor is issi. if so, `rom_spiflash_unlock()` only send RDSR to read the status register, send WRSR with only 1 byte argument, and also avoid clearing the QE bit (bit 6).

3. `rom_spiflash_unlock()` always send WRSR command to clear protection bits even when there is no protection bit active. And the execution of clearing status registers, which takes about 700us, will also happen even when there's no bits cleared.

   This commit skips the clearing of status register if there is no protection bits active.

Also move the execute_flash_command to be a bootloader API; move
implementation of spi_flash_wrap_set to the bootloader
2022-10-17 19:15:25 +08:00
Michael (XIAO Xufeng)
740b961bb1 test_spiffs: increase test case stack size 2022-10-17 19:15:24 +08:00
Michael (XIAO Xufeng)
61989e0fbb spi_flash: partially move API functions out of IRAM 2022-10-17 19:15:24 +08:00
wangjialiang
eab26282ce ble_mesh: stack: Add IV index recovery option when device missed the whole IV update 2022-10-17 16:55:46 +08:00
wangjialiang
11bd23d67e ble_mesh: stack: Fix send fast interval prov_adv failed when PB-ADV and PB-GATT enable simultaneously 2022-10-17 16:41:12 +08:00
Song Ruo Jing
ed3a570e20 rtc_clk: Fix rtc8m calibration failure after cpu/core reset
Explicitly guarantee 8md256 clk is enabled before calibration
2022-10-12 12:46:41 +08:00
Wang Meng Yang
40cc53b0e0 Merge branch 'bugfix/a2dp_can_not_connect_after_ble_connected_v4.1' into 'release/v4.1'
fixed the issue iOS devices cannot initiate connection (v4.1)

See merge request espressif/esp-idf!20407
2022-10-10 17:25:46 +08:00
Jin Cheng
11bd663e9e fixed the issue iOS devices cannot initiate connection
to ESP32 while there is a BLE connection to this ESP32

Closes https://github.com/espressif/esp-idf/issues/6557
2022-09-28 16:16:45 +08:00
jgujarathi
45ce744c54 esp-wifi: Restores station status to connected when no other AP is found for roam 2022-09-28 12:26:48 +05:30
cjin
b70ffe519f fix on data len change cmd malfunction 2022-09-27 21:53:50 +08:00
cjin
284b77e6a5 fix err using rpa for confirmation calculation 2022-09-27 21:53:36 +08:00
zwj
615dcb4115 fix calling esp_ble_get_cur_sendable_packets_num() sometimes crashes when bluetooth is disconnecting 2022-09-27 21:53:23 +08:00
Island
85c878acc5 Merge branch 'bugfix/relay_friend_cred_message_v4.1' into 'release/v4.1'
ble_mesh: stack: Fix friend relay lpn message when relay disable(v4.1)

See merge request espressif/esp-idf!20207
2022-09-22 14:17:36 +08:00
Mahavir Jain
017852bc2d Merge branch 'bugfix/freertos_event_group_unblock_race_condition_v4.1' into 'release/v4.1'
FreeRTOS: Fix event group task list race condition (v4.1)

See merge request espressif/esp-idf!19106
2022-09-21 13:16:24 +08:00
wangjialiang
d2fcb15610 ble_mesh: stack: Fix friend relay lpn message when relay disable. 2022-09-21 03:37:41 +00:00
Island
26c7df9857 Merge branch 'bugfix/lpn_not_recv_message_to_all_node_4.1' into 'release/v4.1'
ble_mesh: stack: Add option for lpn auto sub all-nodes(v4.1)

See merge request espressif/esp-idf!20261
2022-09-21 11:31:17 +08:00
wangjialiang
ef45e12a40 ble_mesh: stack: Add option for lpn auto sub all-nodes. 2022-09-20 20:33:13 +08:00
Darian Leung
51eb9bea03 freertos: Fix flakey event group unit test
The "FreeRTOS Event Groups" main task will only wait a single tick for the created
tasks to set their response bits. This short delay may not be sufficent if the tick
frequency is high.

This commit updates the test so that

- the main task waits indefinitely for all the response bits to be set.
- created tasks are cleaned up by the main task
2022-09-19 15:14:24 +08:00
Darian Leung
6358f93a51 freertos: Fix event group task list race condition
FreeRTOS synchronization primitives (e.g., queues, eventgroups) use various event lists (i.e., task lists) to track what
tasks are blocked on a current primitive. Usually these event lists are accessed via one of the event lists functions
(such as vTask[PlaceOn|RemoveFrom]UnorderedEventList()), which in turn ensure that the global task list spinlock
(xTaskQueueMutex) is taken when accessing these lists.

However, some functions in event_groups.c manually traverse their event lists. Thus if a tick interrupt occurs on
another core during traversal and that tick interrupt unblocks a task on the event list being traversed, the event list
will be corrupted.

This commit modifies the following event_groups.c functions so that they take the global task list lock before
traversing their event list.

- xEventGroupSetBits()
- vEventGroupDelete()
2022-09-19 15:14:24 +08:00
Island
0bb4b995be Merge branch 'bugfix/adapt_new_btc_v4.1' into 'release/v4.1'
ble_mesh: stack: Corrected parameter size when the btc_transfer_context is used (v4.1)

See merge request espressif/esp-idf!20169
2022-09-18 14:36:02 +08:00
wangjialiang
6160cedbdc ble_mesh: stack: added the judgment that the parameter is NULL but the parameter len is not zero to avoid btc_transfer_context failed 2022-09-15 17:03:22 +08:00
Jiang Jiang Jian
b4878a0f09 Merge branch 'bugfix/stack_init_changes_v4.1' into 'release/v4.1'
Nimble: Check stack initialization status before executing stack command (v4.1)

See merge request espressif/esp-idf!19946
2022-09-14 16:13:32 +08:00
xiongweichao
c2411837d1 bt:Fixed sink not being able to output mono audio because it can only decode dual channel audio data 2022-09-09 17:49:00 +08:00
Wang Meng Yang
771e1cb020 Merge branch 'bugfix/remove_bt_dft_init_semicolon_v41' into 'release/v4.1'
bt: Remove trailing semicolon from bt dft initializer(v4.1)

See merge request espressif/esp-idf!19918
2022-09-07 12:00:48 +08:00