Commit Graph

12314 Commits

Author SHA1 Message Date
Chen Wu
7f1ab6d8d1 http: Fix parsing invalid url cause to crash
Reason:
For example, if an url is lack of leading 'http:' by mistake, it causes to http_parser_parse_url() cannot parse http host item,
and then pass the null host pointer to _get_host_header(), crash happens.

Fix:
http added null pointer check now.

Closes https://jira.espressif.com:8443/browse/ESPAT-953
2022-01-12 16:17:20 +08:00
Wang Meng Yang
f68da60831 Merge branch 'bugfix/fix_bluedroid_compile_issue_v4.3' into 'release/v4.3'
components/bt: Fix bluedroid compile issue(backport release/v4.3)

See merge request espressif/esp-idf!16593
2022-01-11 09:52:16 +00:00
KonstantinKondrashov
f295efce12 esp_system: Fix RTC_WDT protection in esp_restart_noos
Fixed issue - v4.3 app not compatible with 3.1 bootloader
2022-01-10 21:57:46 +08:00
David Čermák
b0060dc0a3 Merge branch 'bugfix/mqtt_update_refs_v4.3' into 'release/v4.3'
MQTT: Fix build if CONFIG_WS_TRANSPORT is not set and client cleanups (v4.3)

See merge request espressif/esp-idf!15627
2022-01-10 10:25:06 +00:00
Wang Meng Yang
06f2f1c6b2 Merge branch 'bugfix/fix_null_pointer_deference_issue_4.3_mr' into 'release/v4.3'
Fix the null pointer deference issue via Reconnection Spamming

See merge request espressif/esp-idf!16638
2022-01-10 08:44:25 +00:00
Wang Meng Yang
62c10b2a05 Merge branch 'bugfix/PRs_on_esp_hid_v4.3' into 'release/v4.3'
bugfix/handle_3_esp_hid_PRs (v4.3)

See merge request espressif/esp-idf!16591
2022-01-10 03:21:32 +00:00
David Cermak
308b3e31a3 MQTT: Fix build if CONFIG_WS_TRANSPORT is not set and client cleanups
Updated MQTT submodule: git log --oneline f10321a53b53a146ee299cfecc320b89c0cf6611...89894bd0c611b1392967fe90bb49682eba858383
* Fix build issue if cert bundle disabled
* Fix build issue if ws transport disabled
* Add config to set retransmission interval

Detailed description of the changes (f10321a53b...89894bd0c6):
* Added config option to configure custom retransmission interval
    - See merge request espressif/esp-mqtt!110
    - esp_mqtt commit 1b009c840b
    - Related https://github.com/espressif/esp-mqtt/pull/199
* Configuration conflicts were verified, logged but not reported to the user.
    - See merge request espressif/esp-mqtt!102
    - esp_mqtt commit 88f4b8ed50
* Fixed build issue if cert bundle disabled
    - See merge request espressif/esp-mqtt!109
    - esp_mqtt commit 4a89bff610
    - esp_mqtt commit 1b71980575
    - esp_mqtt commit 5b3c81ee48
    - Related https://github.com/espressif/esp-mqtt/pull/198
    - Related https://github.com/espressif/esp-idf/issues/7535
* Removes unnecessary outbox_cleanup
    - This function were used on old version to handle QoS 2 messages. It's no longer necessary in current implementation.
    - See merge request espressif/esp-mqtt!108
    - esp_mqtt commit ebef896b00
* Fixed return an error when fail to enqueue
    - The functions that enqueue messages didn't had a return for the handler, with this the error was only logged instead of returned whichmay cause the user to have an ID for a message that was not published.
    - See merge request espressif/esp-mqtt!103
    - esp_mqtt commit 7471177fe7
* CI: Use qemu image based on esp-env:v4.4-1
    - Replaced the temporary qemu image with the official qemu:v4.4-1-20210517 derived from the esp-env:v4.4-1 test environment
    - See merge request espressif/esp-mqtt!107
    - esp_mqtt commit 231b274962

Closes https://github.com/espressif/esp-idf/issues/7535
2022-01-07 15:07:27 +00:00
Zim Kalinowski
6dce875bf9 Merge branch 'bugfix/freertos_pd_ticks_to_ms_precision_v4.3' into 'release/v4.3'
Freertos: Fix loss of precision in pdTICKS_TO_MS (v4.3)

See merge request espressif/esp-idf!16675
2022-01-07 14:32:13 +00:00
Zim Kalinowski
9138b9aff5 Merge branch 'bugfix/crypto_allocate_lldesc_v4.3' into 'release/v4.3'
crypto: dont create DMA descriptors on the stack (v4.3)

See merge request espressif/esp-idf!16342
2022-01-07 08:45:43 +00:00
Zim Kalinowski
ade22c9072 Merge branch 'bugfix/fix_heap_memory_corruption_v4.3' into 'release/v4.3'
Heap: Fix a possible bug in the TLSF allocator (backport v4.3)

See merge request espressif/esp-idf!16508
2022-01-06 11:36:47 +00:00
Omar Chebib
d300a9cfe3 Heap: Fix a possible bug in the TLSF allocator (backport v4.3) 2022-01-06 11:36:46 +00:00
Jiang Jiang Jian
e383693ac2 Merge branch 'bugfix/set_authmode_by_switching_number_to_string_v4.3' into 'release/v4.3'
CI: change ap authmode from number to string (backport v4.3)

See merge request espressif/esp-idf!16554
2022-01-06 10:10:03 +00:00
lisekt84
3764b03734 freertos: Fix loss of precision in pdTICKS_TO_MS
Closes https://github.com/espressif/esp-idf/pull/7856
Closes https://github.com/espressif/esp-idf/issues/7853

[darian@espressif.com: Updated commit message]
Signed-off-by: Darian Leung <darian@espressif.com>
2022-01-06 15:54:01 +08:00
Wang Meng Yang
b9c5ef1717 Merge branch 'bugfix/fix_spp_open_err_bda_v4.3' into 'release/v4.3'
Component_bt/Fix SPP acceptor open with wrong remote address[backport 4.3]

See merge request espressif/esp-idf!16614
2022-01-06 04:06:42 +00:00
Zim Kalinowski
d6b5b0ab00 Merge branch 'bugfix/pthread_destructor_sequencing_v4.3' into 'release/v4.3'
pthread: Fix behaviour when pthread destructor calls pthread_getspecific/pthread_setspecific (v4.3)

See merge request espressif/esp-idf!14828
2022-01-06 00:38:14 +00:00
Marius Vikhammer
6e9d90d6e1 soc: Added support for specify the maximum descriptor length when setting up the DMA descriptor link 2022-01-06 08:11:57 +08:00
Marius Vikhammer
2a28ec3522 crypto: also apply cache writeback/invalidate for SPIRAM_USE_MEMMAP
Closes https://github.com/espressif/esp-idf/issues/7944
2022-01-06 08:11:57 +08:00
Marius Vikhammer
b957692888 crypto: allocate all DMA descriptors to DMA capable memory.
These were previously placed on the stack, but the stack could be placed in
RTC RAM which is not DMA capable.
2022-01-06 08:11:57 +08:00
Murray Fordyce
606d7e48d2 Fixed left right key confusion in comments.
"Left" and "Right" were swapped in some comments.
2022-01-05 10:47:56 +08:00
Mahavir Jain
0bc2cb89e5 Merge branch 'bugfix/rtc_section_alignment_v4.3_2' into 'release/v4.3'
System: fix RTCFAST section alignment (v4.3)

See merge request espressif/esp-idf!16518
2022-01-04 12:34:12 +00:00
“YangZhao”
74f4d07c3b There is an issue that if the the btm_cb.p_sec_dev_rec_list is full,but at the same
time we can't find old device to be replaced,then this can cause crash. So we need
to change the way to malloc the new device or replace the old in the list.
2022-01-04 11:09:44 +08:00
Zim Kalinowski
5965ad859d Merge branch 'bugfix/ringbuf_read_pointer_wrap_v4.3' into 'release/v4.3'
ringbuf: Fix bug where comparision between a signed and unsigned operand resulted in incorrect free size for no-split/allow-split buffers (v4.3)

See merge request espressif/esp-idf!15882
2022-01-04 02:31:48 +00:00
David Čermák
f8d60e2008 Merge branch 'bugfix/dm9051_tx_throughput_rate_optimization_v4.3' into 'release/v4.3'
esp_eth: optimize dm9051 Tx throughput(v4.3)

See merge request espressif/esp-idf!15886
2022-01-03 12:42:54 +00:00
David Cermak
d34f2e407b wifi: Fix race conditon invoking invalid callback on deinit
Closes https://github.com/espressif/esp-idf/issues/7579
2022-01-03 11:04:17 +01:00
Zim Kalinowski
1dfe3570b4 Merge branch 'bugfix/psram_fix_bootloader_v4.3' into 'release/v4.3'
bootloader: disable psram cache bug fix for bootloader (v4.3)

See merge request espressif/esp-idf!15805
2022-01-02 06:14:08 +00:00
Zim Kalinowski
aef7850157 Merge branch 'bugfix/freertos_round_robin_scheduling_retain_skip_v4.3' into 'release/v4.3'
freertos: Implement best effort round robin scheduling (v4.3)

See merge request espressif/esp-idf!16542
2021-12-31 02:58:53 +00:00
Zim Kalinowski
04d2887493 Merge branch 'bugfix/spi_slave_test_non_dma_v4.3' into 'release/v4.3'
spi-slave: fix single-board: hd test failing due to DMA buffers ending up in PSRAM (v4.3)

See merge request espressif/esp-idf!16306
2021-12-31 02:57:25 +00:00
Xie Wen Xiang
9b2f6a2a77 Merge branch 'bugfix/fix_bluedroid_ble50_adv_data_length_issue_v4.3' into 'release/v4.3'
components/bt: Fix bluedroid ble50 adv data length issue(backport release/v4.3)

See merge request espressif/esp-idf!16580
2021-12-31 00:40:11 +00:00
liqigan
04bea91b38 fix SPP open with wrong remote bd_addr 2021-12-30 16:36:51 +08:00
xiewenxiang
abacbb1d12 components/bt: Fix bluedroid compile issue 2021-12-30 11:58:21 +08:00
Robin Krens
0818a8b4f1 spacing styling correction 2021-12-30 10:57:30 +08:00
Robin Krens
f61b57e5e5 minor styling changes 2021-12-30 10:57:30 +08:00
Robin Krens
837d4637f5 esp_hid: fix output report char declaration
Current issue: output reports sent by Windows not received.
The report characteristic declaration should also support write without
response as specified by HIDS profile:
See https://www.bluetooth.com/specifications/GATT/ (page 14)
2021-12-30 10:57:30 +08:00
xiewenxiang
aaeecdf0e7 component/bt: Support set HW CCA threshold value 2021-12-29 15:40:26 +08:00
xiewenxiang
ab2148a390 component/bt: fix periodic adv parameters detection issue 2021-12-29 15:03:28 +08:00
Laukik Hase
cc5e2107bb wifi_prov_mgr: Added check for passphrase length in softAP scheme
Closes https://github.com/espressif/esp-idf/issues/8063
2021-12-28 18:13:51 +05:30
Omar Chebib
7467c68a17 Merge branch 'bugfix/xStreamBufferReset_crashing_v4.3' into 'release/v4.3'
FreeRTOS: Fix xStreamBufferReset function always crashing (backport v4.3)

See merge request espressif/esp-idf!16171
2021-12-27 14:25:01 +00:00
huchaoru
143fb842a5 CI: change ap authmode from number to string (backport v4.3) 2021-12-27 19:59:11 +08:00
Ivan Grokhotkov
df5f73e165 Merge branch 'bugfix/modbus_port_fix_lgpl_licensed_files_v43' into 'release/v4.3'
freemodbus: fix port contains lgpl licensed files (backport v4.3)

See merge request espressif/esp-idf!16183
2021-12-27 10:02:21 +00:00
Sudeep Mohanty
7c0d99e68d ringbuf: Fix bug where comparision between a signed and unsigned operand resulted in incorrect free size for no-split/allow-split buffers
This commit fixes a bug in no-split and allow-split ring buffers free buffer size calculation.
When the free size available in the buffers less than the size of one item header,
the function prvGetCurMaxSizeNoSplit/AllowSplit() incorrectly returned the maxItemSize instead of 0.
This is due to the comparision between a negative and a positive value
where both operands are treated as unsigned during the comparision operation,
thereby treating the negative operand as a large integer.

Also added new unit tests to test buffer-full and almost-full conditions
where this scenario is likely to be hit.

Closes https://github.com/espressif/esp-idf/issues/7344
Closes https://github.com/espressif/esp-idf/pull/7371
2021-12-27 15:02:27 +08:00
Mahavir Jain
8a7b2f326b Merge branch 'bugfix/freertos_prvTaskIsTaskSuspended_v4.3' into 'release/v4.3'
freertos: Fix prvTaskIsTaskSuspended check (v4.3)

See merge request espressif/esp-idf!16540
2021-12-27 03:56:22 +00:00
Darian Leung
e9cbf56d36 freertos: Fix SMP round robin scheduling
The previous SMP freertos round robin would skip over tasks when
time slicing. This commit implements a Best Effort Round Robin
where selected tasks are put to the back of the list, thus
makes the time slicing more fair.

- Documentation has been updated accordingly.
- Tidy up vTaskSwitchContext() to match v10.4.3 more
- Increased esp_ipc task stack size to avoid overflow

Closes https://github.com/espressif/esp-idf/issues/7256
2021-12-27 11:52:11 +08:00
Darian Leung
c33b260e7a freertos: Fix prvTaskIsTaskSuspended check
This commit fixes prvTaskIsTaskSuspended(). Both pending ready lists
should be checked to confirm that is truly suspended.

Closes https://github.com/espressif/esp-idf/issues/7564
2021-12-24 21:08:56 +08:00
morris
19ddefeb5c timer: stop alarm if alarm value doesn't change in ISR handler
Alarm will be disabled by hardware when alarm event happend.
In the ISR, if auto-reload is enabled, we should re-enable the alarm.
If the alarm target value is changed in user's callback,
the alarm will be reenabled as well.

Closes https://github.com/espressif/esp-idf/issues/7001
Closes https://github.com/espressif/esp-idf/issues/8095
2021-12-24 12:28:45 +08:00
Yang Zhao
65edf90e93 Update esp32c3 phy lib and bb lib
Fix the ble task watchdog timeout issue caused by phy enable when exit modem sleep.
2021-12-23 20:30:12 +08:00
Mahavir Jain
da6c5be6c1 Merge branch 'feature/mbedtls_dynamic_memory_v4.3' into 'release/v4.3'
fix(mbedtls): fix compiling error when open MBEDTLS_SSL_PROTO_DTLS and disable...(backport v4.3)

See merge request espressif/esp-idf!16521
2021-12-23 11:43:45 +00:00
Ivan Grokhotkov
f8ee842e8c Merge branch 'bugfix/ringbuf_send_semaphore_release_order_v4.3' into 'release/v4.3'
esp_ringbuf: Fix order of semaphore release in xRingbufferSend (v4.3)

See merge request espressif/esp-idf!16230
2021-12-23 07:51:39 +00:00
Li Jingyi
e3b39381fd fix(mbedtls): fix compiling error when open MBEDTLS_SSL_PROTO_DTLS and disable MBEDTLS_DYNAMIC_BUFFER feature when MBEDTLS_SSL_PROTO_DTLS is selected 2021-12-23 15:34:18 +08:00
Omar Chebib
5e805d58a8 FreeRTOS: Fix xStreamBufferReset function always crashing
This function resets the spinlock given as a parameter after taking it
(when entering the critical section). This then results in a panic once
it tries to exit the same critical section.

* Closes https://github.com/espressif/esp-idf/issues/7725
2021-12-23 06:15:50 +00:00
Jiang Jiang Jian
57efd94fea Merge branch 'bugfix/scannable_adv_duration_estimation_v4.3' into 'release/v4.3'
[Coexistence]: fixed BLE scannable extended adv performance issue in case of Wi-Fi coexistence(backport v4.3)

See merge request espressif/esp-idf!16477
2021-12-23 04:21:37 +00:00
Wang Fang
9abfa2c645 Merge branch 'fix/remove_deprecated_macro_SPI_TRANS_SET_CD' into 'release/v4.3'
Remove a deprecated macro: SPI_TRANS_SET_CD

See merge request espressif/esp-idf!16494
2021-12-23 02:21:11 +00:00
Martin Vychodil
d581312451 System: fix RTCFAST section alignment
This bugfix contains 3 fixes:
1. .rtc_dummy section is removed (not needed for C3)
2. .rtc_text section is padded with 16B for possible CPU prefetch
3. .rtc_text section is aligned to 4B boundary to comply with PMS Memprot requirements
2021-12-23 02:09:46 +01:00
Jiang Jiang Jian
7a4ed65769 Merge branch 'bugifx/nimble_timer_memory_leak_v4.3' into 'release/v4.3'
[NimBLE]: Fixed memory leak of timer during NimBLE Host start-stop process(backport v4.3)

See merge request espressif/esp-idf!16446
2021-12-22 13:34:03 +00:00
Jiang Jiang Jian
31d1156c6d Merge branch 'bugfix/fix_can_not_find_mac_addr_error_mr_4.3' into 'release/v4.3'
fix can not find mac addr error

See merge request espressif/esp-idf!16146
2021-12-22 13:33:29 +00:00
Jiang Jiang Jian
25c047d2fa Merge branch 'bugfix/wpa_supplicant_logs_release_v4.3' into 'release/v4.3'
esp_wifi: Change the verbosity of wpa_supplicant logs. (Backport v4.3)

See merge request espressif/esp-idf!16348
2021-12-22 13:32:58 +00:00
Jiang Jiang Jian
0fed811a46 Merge branch 'feature/mbedtls-2.16.12-integration_v4.3' into 'release/v4.3'
mbedtls: upgrade to release v2.16.12 (v4.3)

See merge request espressif/esp-idf!16484
2021-12-22 13:32:30 +00:00
Mahavir Jain
bd5176f108 Merge branch 'bugfix/vfs_io_disabled_console_v4.3' into 'release/v4.3'
Fix console output flushing when CONFIG_VFS_SUPPORT_IO is disabled (v4.3)

See merge request espressif/esp-idf!15653
2021-12-22 13:12:21 +00:00
Jiang Jiang Jian
39ab27d0cf Merge branch 'bugfix/wps_fixes_v4.3' into 'release/v4.3'
wpa_supplicant: Add WPS Fixes (backport V4.3)

See merge request espressif/esp-idf!16151
2021-12-22 12:20:46 +00:00
Jiang Jiang Jian
7c9ef7466f Merge branch 'bugfix/riscv_fix_vector_mcause_v4.3' into 'release/v4.3'
RISC-V: fix usage of special register when interrupts are enabled (backport v4.3)

See merge request espressif/esp-idf!16188
2021-12-22 10:09:55 +00:00
Mahavir Jain
97f8f1b0d6 Merge branch 'feature/mbedtls_dynamic_memory_v4.3' into 'release/v4.3'
feat(mbedtls): modify __wrap_mbedtls_ssl_setup to decrease SSL peak heap cost(backport v4.3)

See merge request espressif/esp-idf!16274
2021-12-22 08:21:43 +00:00
Zim Kalinowski
eef3c878aa Merge branch 'bugfix/fix_select_timeout_v4.3' into 'release/v4.3'
VFS: `select` function's timeout is now POSIX compliant (backport v4.3)

See merge request espressif/esp-idf!16190
2021-12-22 05:49:13 +00:00
Mahavir Jain
ad2652c1f4 Merge branch 'bugfix/stdatomic_sync_op_and_fetch_v4.3' into 'release/v4.3'
newlib: stdatomic: implement missing "op_fetch", "nand" builtins (v4.3)

See merge request espressif/esp-idf!16466
2021-12-22 04:14:53 +00:00
Zim Kalinowski
f00a1bf164 Merge branch 'bugfix/fix_esp32h2_efuse_get_ext_mac_v4.3' into 'release/v4.3'
efuse_table_gen: Fixes wrong joining fields with omitted names (v4.3)

See merge request espressif/esp-idf!15738
2021-12-22 02:17:47 +00:00
Ivan Grokhotkov
e0777cbbd4 Merge branch 'bugfix/freertos_linker_lf_fixes_v4.3' into 'release/v4.3'
freertos: linker.lf rules fixes (v4.3)

See merge request espressif/esp-idf!14042
2021-12-22 00:17:22 +00:00
Wang Fang
641e86c1dc fix: remove a deprecated macro: SPI_TRANS_SET_CD 2021-12-21 17:44:15 +08:00
Mahavir Jain
0fd5c562bf mbedtls: upgrade to release v2.16.12
For release notes, please refer to:
https://github.com/ARMmbed/mbedtls/releases/tag/v2.16.12
2021-12-21 14:04:31 +05:30
Mahavir Jain
9d79b70acf mbedtls: small documentation update 2021-12-21 14:04:12 +05:30
Li Jingyi
32e29580de feat(mbedtls): modify __wrap_mbedtls_ssl_setup to decrease SSL peak heap cost 2021-12-21 15:19:29 +08:00
wangmengyang
3f63a4caee component/bt: fixed coexistence scannable extended adv performance issue 2021-12-21 12:55:13 +08:00
Wang Meng Yang
450b05a64a Merge branch 'bugfix/fix_spp_listen_err_v4.3' into 'release/v4.3'
Component_bt/Fix SPP cannot malloc slot bugs[backport v4.3]

See merge request espressif/esp-idf!16384
2021-12-21 04:35:07 +00:00
Jiang Jiang Jian
778faeb7dd Merge branch 'fix/remove_warning_when_disabling_rom_dl_mode_v4.3' into 'release/v4.3'
secure_boot: Fix warning when UART ROM DL mode is disabled (v4.3)

See merge request espressif/esp-idf!16238
2021-12-21 03:54:33 +00:00
Jiang Jiang Jian
e9f47296a8 Merge branch 'reduce_bootup_time_when_using_usb-serial-jtag_v4.3' into 'release/v4.3'
rtc_clk: reduce bootup time when using usb-serial-jtag(backport v4.3)

See merge request espressif/esp-idf!16261
2021-12-21 03:52:39 +00:00
Jiang Jiang Jian
7dbfd01520 Merge branch 'bugfix/hardware_mpi_fallback_issue_v4.3' into 'release/v4.3'
mbedtls: fix hardware MPI (bignum) related regression (v4.3)

See merge request espressif/esp-idf!16237
2021-12-21 03:49:11 +00:00
Jiang Jiang Jian
6c38e7c5de Merge branch 'bugfix/esptool_bump_v4.3' into 'release/v4.3'
bugfix: ESP32 rev0/1 connection in release/v4.3

See merge request espressif/esp-idf!16218
2021-12-21 03:47:24 +00:00
Jiang Jiang Jian
4ab1fb9b2a Merge branch 'bugfix/bootloader_debug_buffers_v4.3' into 'release/v4.3'
bootloader_support: Fix and re-enable bootloader_debug_buffer function (v4.3)

See merge request espressif/esp-idf!16074
2021-12-21 03:45:32 +00:00
Jiang Jiang Jian
683a98fbe3 Merge branch 'feature/adds_fault_injection_protection_for_check_anti_rollback_v4.3' into 'release/v4.3'
bootloader_support: Adds fault injection protection for check_anti_rollback (v4.3)

See merge request espressif/esp-idf!16180
2021-12-21 03:44:41 +00:00
Jiang Jiang Jian
0193aeffd6 Merge branch 'feature/add_dhcp_option_v4.3' into 'release/v4.3'
lw-ip: Add macro to disable vendor class option(backport v4.3)

See merge request espressif/esp-idf!15983
2021-12-21 03:44:09 +00:00
Jiang Jiang Jian
9a0a697b27 Merge branch 'bugfix/mdns_non_standard_domains_v4.3' into 'release/v4.3'
mdns: Fix parsing non-standard queries (v4.3)

See merge request espressif/esp-idf!16060
2021-12-21 03:43:18 +00:00
Jiang Jiang Jian
3eb854c3ea Merge branch 'bugfix/LAN8720_reset_assertion_v4.3' into 'release/v4.3'
Increased LAN8720 ETH-PHY reset assertion time (v4.3)

See merge request espressif/esp-idf!15826
2021-12-21 03:42:37 +00:00
Jiang Jiang Jian
e7db515b35 Merge branch 'bugfix/link_spi_flash_rom_func_in_bootloader_stage_v4.3' into 'release/v4.3'
esp_rom: link rom spi flash functions in bootloader stage (v4.3)

See merge request espressif/esp-idf!15257
2021-12-21 03:42:15 +00:00
Wang Meng Yang
04f69192d2 Merge branch 'bugfix/fix_blufi_encryption_fail_v4.3' into 'release/v4.3'
components/bt: fix blufi encryption fail(backport release/v4.3)

See merge request espressif/esp-idf!16315
2021-12-21 03:30:02 +00:00
Wang Meng Yang
91d7557579 Merge branch 'feature/support_ble_direct_ind_low_adv_v4.3' into 'release/v4.3'
components/bt: Support low duty cycle directed advertising(backport release/v4.3)

See merge request espressif/esp-idf!16378
2021-12-21 03:27:09 +00:00
Angus Gratton
564229c9a6 pthread: Fix behaviour when pthread destructor calls pthread_getspecific/pthread_setspecific
Update as per specification at https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_key_create.html

Specifically:

- Before a destructor is called then the value for the corresponding key is
  already set to NULL.

- If a destructor calls pthread_setspecific() to assign a non-NULL value then
  this destructor is called again, after all existing non-NULL values have been
  called.

Adds a test for this relatively complex behaviour.

Closes https://github.com/espressif/esp-idf/issues/6643
2021-12-21 01:27:49 +00:00
Ivan Grokhotkov
e26a2250a5 freertos: linker.lf rules fixes
1. Add conditions based on Kconfig options for functions which are
   compiled based on those options.
2. Static allocation is always enabled, move corresponding functions
   into the common list.
2021-12-21 01:26:44 +00:00
Ivan Grokhotkov
8e7b11f6d1 newlib: set errno in the explicitly provided reent structure
Since these functions receive the pointer to reent structure, they
should set errno in it rather than using thread-local errno.

This didn't cause practical issues because console functions in IDF
are only called from threads, and in that case 'r' is a pointer to
the thread-local structure, so &errno is the same thing as
&__errno_r(r). Still, fixing this for consistency.
2021-12-21 01:25:49 +00:00
Ivan Grokhotkov
3d91e6d993 newlib: implement _fstat_r stub for console
When CONFIG_VFS_SUPPORT_IO is disabled, _read_r and _write_r
implementations in syscalls.c are used to provide console I/O via
esp_rom_uart_tx_one_char/esp_rom_uart_rx_one_char.

When newlib opens a (FILE*) stream, it calls fstat to check if the
underlying file is character-oriented. In this case, it configures the
stream to use line buffering. Otherwise (or if fstat fails) the stream
is opened as block buffered.

Since fstat wasn't provided, stdin/stdout/stderr streams got opened in
block buffered mode. For console, we need line buffered output so that
the stream buffer is flushed each time a complete line (ending with
'\n') is sent to stdout or stderr.

Fix by implementing _fstat_r stub, setting st->st_mdoe=S_IFCHR.
2021-12-21 01:25:49 +00:00
Ivan Grokhotkov
bd598e36ea newlib: stdatomic: implement missing "op_fetch", "nand" builtins
* Adds implementations of __{atomic,sync}_nand_fetch_n. These builtins
  were implemented for other operations but were not defined for NAND.
* Adds implementation of __atomic_OP_fetch_n for all OPs.
* Adds implementation of __sync_OP_and_fetch_n for all OPs.

Reported in https://github.com/espressif/arduino-esp32/issues/5948
2021-12-21 02:16:02 +01:00
Omar Chebib
824552e9b4 RISC-V: fix usage of special register when interrupts are enabled 2021-12-21 01:06:11 +00:00
Ivan Grokhotkov
3c0d892d43 Merge branch 'bugfix/missing-atomic-definitions' into 'release/v4.3'
newlib: missing atomic definitions (v4.3)

See merge request espressif/esp-idf!15610
2021-12-21 01:03:24 +00:00
Ivan Grokhotkov
5ec8dcf937 Merge branch 'bugfix/scheduler_state_query_thread_safety_v4.3' into 'release/v4.3'
freertos: fix thread safety for checking scheduler state (v4.3)

See merge request espressif/esp-idf!16131
2021-12-21 01:02:12 +00:00
Ivan Grokhotkov
8bf14a9238 versions: Update version to 4.3.2 2021-12-20 19:02:41 +01:00
Kapil Gupta
92331a8c62 wpa_supplicant: Add WPS Fixes
Add following bugfixes

1. Station not able to connect when WPS pin is pressed first on AP.
2. PBC overlap getting detected for selected registrar PIN APs.
3. Station not considering authorised MACs for PIN method.
4. For PIN methodm If no AP is found, station will loop through
   APs in its vicinity and try to do WPS with them one by one till
   WPS timeout occurs. This is for some APs which do not set
   selected registrar correctly.
2021-12-20 22:02:53 +05:30
wangmengyang
971d9b9436 component/bt/host/nimble: fixed memory leak due to timer not destroyed during NimBLE host start-stop 2021-12-20 15:55:47 +08:00
liqigan
a269df84e9 fix SPP server bugs when the BTC layer can not allocate a slot for the listen port 2021-12-14 11:07:29 +08:00
xiewenxiang
a7900f871f components/bt: Fix high duty cycle directed advertising will not be stopped when timeout 2021-12-14 09:33:24 +08:00
xiewenxiang
d4cc192782 components/bt: Support low duty cycle directed advertising 2021-12-14 09:33:17 +08:00
xiewenxiang
8409e3bcbe components/bt: fix blufi encryption fail 2021-12-13 09:55:00 +08:00
Hrudaynath Dhabe
d3b88a13e1 esp_wifi: Change the verbosity of wpa_supplicant logs. 2021-12-09 12:41:36 +05:30
Marius Vikhammer
44af11f38c spi-slave: fix single-board: hd test failing due to DMA buffers ending up in PSRAM 2021-12-08 12:17:06 +08:00
jingli
4b73610eea reduce bootup time when using usb-serial-jtag 2021-12-03 20:55:52 +08:00
RichFalk
2305b5f474 esp_ringbuf: Fix assertion xQueueGenericSend queue.c:818
The release of the semaphore indicating the item was successfully sent must be the last semaphore released.  The receiver may be in another task and may delete the Ringbuffer (such as with a return code across tasks design pattern) if they are through with the Ringbuffer.

The function xRingbufferSendAcquire followed by xRingbufferSendComplete had the semaphores released in the proper order and that same pattern should have been used in xRingbufferSend and xRingbufferSendFromISR.  This commit fixes this order.

Issue (IDFGH-6030) #7716 describes the problem in more detail.

Closes IDFGH-6030, https://github.com/espressif/esp-idf/issues/7716
Closes IDFGH-6036, https://github.com/espressif/esp-idf/pull/7721
2021-12-03 09:34:15 +05:30
Mahavir Jain
70936f4c92 mbedtls: remove wrap from component.mk as well
Note: This was not required in original MR, as master branch does
not support GNU Make.
2021-12-02 17:15:42 +05:30
Aditya Patwardhan
9fb61791fe secure_boot: Fix warning when UART ROM DL mode is disabled
*Additionally use updated calls to enable rom secure download mode
2021-12-02 15:17:56 +05:30
Mahavir Jain
7a8c8f8576 esp_bignum: move check for supported MPI bits at start of API
This can allow hardware MPI API to return as soon as it identifies
that it can handle require bitlength operation.
2021-12-02 15:08:42 +05:30
Mahavir Jain
1cae1fc18e mbedtls: update mbedtls submodule pointer for MPI API change 2021-12-02 15:08:41 +05:30
Mahavir Jain
0befb28237 mbedtls: fix hardware MPI (bignum) related regression
In commit de22f3a4e5, combination of
hardware and software MPI (bignum) related approach was used to
work around chip (e.g. ESP32-C3) limitation of max 3072 bits support.

This was done using linker "--wrap" flag but since the relevant API is
being used in same translation (compilation unit), hardware mode was not
getting used in some cases (e.g., RSA key generation).

This commit modified internal mbedTLS API and makes software+hardware
combination deterministic.
2021-12-02 15:08:37 +05:30
Mahavir Jain
f864e1ddbb mbedtls: update kconfig help to correct on supported MPI bits 2021-12-02 15:07:37 +05:30
radim.karnis
4f19ef06fb esptool: Bump version, fix esp32r0/1 connection
Closes https://github.com/espressif/esptool/issues/698
2021-12-01 12:43:50 +01:00
Gustavo Henrique Nihei
f34a85dc31 bootloader_support: Fix and re-enable bootloader_debug_buffer function
The body of the bootloader_debug_buffer function was conditioned to
macros that were never defined, resulting in deactivated code.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-11-30 21:01:55 +08:00
Yang Zhao
f2d6cb7298 Add the feature that switch random address to origin mac addr in the ADV
report data.
2021-11-30 14:27:32 +08:00
Omar Chebib
2ccf84cedf VFS: select function's timeout is now POSIX compliant
`select` function will now round up the timeout passed as a parameter (if any).
It  makes it POSIX compliant.

* Closes https://github.com/espressif/esp-idf/issues/7514
2021-11-30 12:05:34 +08:00
Mahavir Jain
0855521014 bootloader: add anti-FI checks around secure version in anti-rollback scheme 2021-11-29 18:49:36 +05:30
aleks
9204605d98 freemodbus: fix port contains lgpl licensed files
Initial version of freemodbus master port files have been added to ESP-IDF based on https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32.
The overall repository license, at the time of adding these files, has been BSD 3-clause. However at that time, several port files carried LGPL license headers. As the author of these files confirmed in https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32/issues/61#issuecomment-977828450, this wasn't intentional. ESP-IDF version of modbus master port has been rewritten to target FreeRTOS instead of RT-Thread, but the license headers remained from the original version. This commit corrects this, replacing the license of these files with BSD 3-clause.
2021-11-29 14:15:23 +01:00
Mahavir Jain
a8260c9c77 freertos: fix thread safety for checking scheduler state
This issue was earlier fixed in commit 79e74e5d5f
but during migration to newer FreeRTOS release, it got introduced again.

This commit fixes thread safety issues with configASSERT() calls
regarding the value of uxSchedulerSuspended. A false negative
occurs if a context switch to the opposite core occurs in between
the getting the core ID and the assesment.

Relevant https://github.com/espressif/esp-idf/issues/4230
Closes https://github.com/espressif/esp-idf/issues/7726
Closes IDFGH-6041
2021-11-25 19:32:19 +05:30
Jiang Jiang Jian
d95accbda9 Merge branch 'bugfix/multi_heap_get_info_impl_backport_v4.3' into 'release/v4.3'
heap: fix multi_heap_get_info_impl (backport v4.3)

See merge request espressif/esp-idf!16118
2021-11-25 11:45:31 +00:00
Michael (XIAO Xufeng)
d16584c313 Merge branch 'bugfix/spi_slave_wrong_miso_mosi_v4.3' into 'release/v4.3'
spi_slave: Fix MOSI/MISO inconsistent references on the SPI Slave drivers. (v4.3)

See merge request espressif/esp-idf!14405
2021-11-25 09:36:55 +00:00
Jiang Jiang Jian
0c77b89e13 Merge branch 'feature/add_coex_hci_command_v4.3' into 'release/v4.3'
Add hci command to set coexistence status (4.3)

See merge request espressif/esp-idf!16054
2021-11-25 08:02:14 +00:00
Michael (XIAO Xufeng)
8892b4c008 Merge branch 'bugfix/i2c_cmd_not_initailized' into 'release/v4.3'
i2c: fixed i2c_cmd_t not initialized properly issue (v4.3)

See merge request espressif/esp-idf!16096
2021-11-25 04:16:52 +00:00
Michael (XIAO Xufeng)
f055fbb713 i2c: fixed i2c_cmd_t not initialized properly issue 2021-11-25 04:16:51 +00:00
Michael (XIAO Xufeng)
b1ca6be111 Merge branch 'bugfix/modbus_fix_invalid_error_handling_for_duplicate_param_key_v43' into 'release/v4.3'
freemodbus: fix invalid error handling for duplicate param key (backport v4.3)

See merge request espressif/esp-idf!14788
2021-11-25 04:15:33 +00:00
Gustavo Henrique Nihei
de7d86b8a1 driver: Refactor and clean up SPI Slave test 2021-11-25 12:03:55 +08:00
Gustavo Henrique Nihei
7b587bf1d7 driver: Create TX/RX-only test cases for SPI Slave 2021-11-25 12:03:55 +08:00
Gustavo Henrique Nihei
880e96d7bb spi: Ensure DMA In-Link EOF is generated by trans_done on SPI Slave 2021-11-25 12:03:55 +08:00
Gustavo Henrique Nihei
2bc4a0836f spi: Remove Slave TX/RX set bitlen not effective for ESP32-S2/C3/S3
Furthermore, RX_EOF_EN should only be set when SPI Slave is configured
for segment transfer mode and the "ms_data_bitlen" field is configured
to control the "IN_SUC_EOF" interrupt. Since "ms_data_bitlen" is not
set anymore for S2, C3 and S3, "RX_EOF_EN" should be cleared.
2021-11-25 12:03:54 +08:00
Gustavo Henrique Nihei
6fb126657a spi: Fix SPI Slave TX/RX bitlen configuring wrong registers
The maximum input length for the SPI Slave should be applied to the read
buffer configuration, not for the write buffer. Similarly, the output
configuration should also target the write buffer.
2021-11-25 12:03:54 +08:00
Gustavo Henrique Nihei
74f010ddfd spi_slave: Fix MOSI/MISO enable on transaction preparation
MOSI and MISO enablement were conditioned to the existence of TX
and RX buffers, respectively. This is valid for the SPI Master,
but for the SPI Slave the opposite is expected.
2021-11-25 12:03:54 +08:00
gaoxiaojie
61d300f055 heap: fix multi_heap_get_info_impl 2021-11-25 10:22:41 +08:00
Zim Kalinowski
28792cdfea Merge branch 'bugfix/gdbstub_includes' into 'release/v4.3'
[gdbstub]: fixed includes of component.mk (v4.3)

See merge request espressif/esp-idf!15870
2021-11-25 01:51:12 +00:00
aleks
158384043d freemodbus: fix invalid error handling for duplicate param_key 2021-11-25 01:16:10 +08:00
Michael (XIAO Xufeng)
ab5c956bdf Merge branch 'bugfix/esp_timer_before_init_v4.3' into 'release/v4.3'
esp_timer: allow querying the timer before esp_timer_init is called (backport v4.3)

See merge request espressif/esp-idf!15772
2021-11-24 16:44:56 +00:00
Jiang Jiang Jian
23d6e460d9 Merge branch 'bugfix/backport_wifi_fix_1123_v4.3' into 'release/v4.3'
esp_wifi: backport some wifi fix(v4.3)

See merge request espressif/esp-idf!16070
2021-11-24 15:26:43 +00:00
Michael (XIAO Xufeng)
48997e82c0 Merge branch 'bugfix/modbus_fix_compiler_err_when_tcp_is_disabled_v43' into 'release/v4.3'
freemodbus: fix compiler err when tcp is disabled (backport v4.3)

See merge request espressif/esp-idf!14789
2021-11-24 14:13:04 +00:00
Alex Lisitsyn
de7f5305a7 freemodbus: fix compiler err when tcp is disabled (backport v4.3) 2021-11-24 14:13:03 +00:00
Jiang Jiang Jian
daf9cbbb01 Merge branch 'doc/make_classic_bt_API_ref_only_for_esp32_4.3' into 'release/v4.3'
Doc/make classic bt api ref only for esp32 [backport v4.3]

See merge request espressif/esp-idf!15726
2021-11-24 02:54:02 +00:00
Jiang Jiang Jian
050fd07486 Merge branch 'bugfix/fix_crash_when_shutdown_bt_v4.3' into 'release/v4.3'
component/bt: fix crash when shutdown bt(backport v4.3)

See merge request espressif/esp-idf!15709
2021-11-24 02:53:21 +00:00
Angus Gratton
9d72bdda58 asio coap: If LWIP IPV6 is disabled, automatically don't build asio & coap
- Removes need to manually exclude these components as shown at
  https://github.com/espressif/esp-idf/issues/3781#issuecomment-825742378

- Hide the config for these components if IPV6 is disabled

- The components are still included in the build, but with no source
  files

Backport of e305f29382

Closes https://github.com/espressif/esp-idf/issues/7816
2021-11-23 22:39:58 +08:00
Jiang Jiang Jian
76ddca045e Merge branch 'bugfix/sleep_wrong_log_lvl_v4.3' into 'release/v4.3'
Sleep: fix wrong debug level (backport v4.3)

See merge request espressif/esp-idf!16037
2021-11-23 14:31:30 +00:00
Jiang Jiang Jian
4cb5d9a5c8 Merge branch 'bugfix/protocomm_nimble_allocation_v4.3' into 'release/v4.3'
Fix for potential allocation bug in protocomm_nimble.c (v4.3)

See merge request espressif/esp-idf!15997
2021-11-23 13:17:12 +00:00
ChenJianxing
5788bd02c6 esp_wifi: Modify Mexico channel refer to FCC
esp_coex: fix wrong alloctation for coex_funcs_t
2021-11-23 21:13:26 +08:00
Jiang Jiang Jian
793b814789 Merge branch 'mesh/bugfix_fix_layer2_node_connection_issue_v4.3' into 'release/v4.3'
mesh: fix the issue that layer2 node connect to lower-layer node when FIXED-ROOT root disappeared(backport_v4.3)

See merge request espressif/esp-idf!15660
2021-11-23 12:40:52 +00:00
xiewenxiang
1fbf3bcfef component/bt: fix crash when shutdown bt 2021-11-23 20:01:16 +08:00
yuanjm
a8fd3ef48e lwip: Add macro to disable vendor class option 2021-11-23 19:42:47 +08:00
David Cermak
12509dd0c1 mdns: Fix parsing non-standard queries
Fix for packets containing unexpected domains, such as openthread.thread.home.arpa.
If we find this packet we set the name entry as invalid, but continue with parsing as the packet might contain related queries for us.

Closes https://github.com/espressif/esp-idf/issues/7694
2021-11-23 09:10:27 +01:00
Jiang Jiang Jian
b1290591df Merge branch 'bugfix/register_non_32bit_access_v4.3' into 'release/v4.3'
hal: avoid non-32bit access to registers (v4.3)

See merge request espressif/esp-idf!15616
2021-11-23 07:09:41 +00:00
Jiang Jiang Jian
9e37f39441 Merge branch 'bugfix/fix_ble_prefered_ext_conn_parameter_detection_v4.3' into 'release/v4.3'
component/bt: check the ble ext conn parameter(backport v4.3)

See merge request espressif/esp-idf!15769
2021-11-23 06:53:16 +00:00
Jiang Jiang Jian
96b284bcd3 Merge branch 'bugfix/fix_static_check_error_mr_4.3' into 'release/v4.3'
Fix the high-impact issues from the code analysis report from customer.

See merge request espressif/esp-idf!16045
2021-11-23 06:36:23 +00:00
Jiang Jiang Jian
254b78d449 Merge branch 'bugfix/leedarson_v4.3' into 'release/v4.3'
component_bt: Fix some code logic errors (v4.3)

See merge request espressif/esp-idf!16026
2021-11-23 06:34:33 +00:00
Jiang Jiang Jian
e8153a3cd5 Merge branch 'bugfix/sig_ble_mesh_errata_e16350_v4.3' into 'release/v4.3'
ble_mesh: stack: Apply the errata E16350 from Bluetooth SIG (v4.3)

See merge request espressif/esp-idf!15784
2021-11-23 06:30:46 +00:00
Jiang Jiang Jian
07daa951b6 Merge branch 'bugfix/ble_mesh_host_init_v4.3' into 'release/v4.3'
ble_mesh: nimble: return error if init host twice (v4.3)

See merge request espressif/esp-idf!15788
2021-11-23 06:30:28 +00:00
Jiang Jiang Jian
a657543989 Merge branch 'bugfix/nimble_dirty_timer_handle_after_deinit_v4.3' into 'release/v4.3'
[NimBLE]: clear timer handler during de-initialization(backport v4.3)

See merge request espressif/esp-idf!16029
2021-11-23 06:24:11 +00:00