From 3e06ad6af9204678a7b5b3bb480652acd00ac22c Mon Sep 17 00:00:00 2001 From: baohongde Date: Thu, 31 Jan 2019 11:47:41 +0800 Subject: [PATCH 1/2] components/bt: Fix crash when inquiry stop (backport 3.1) --- components/bt/lib | 2 +- components/esp32/ld/esp32.rom.ld | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/components/bt/lib b/components/bt/lib index d473efc5ca..8d91e55a57 160000 --- a/components/bt/lib +++ b/components/bt/lib @@ -1 +1 @@ -Subproject commit d473efc5ca3b1542ebc15536295e04c88cd1ba46 +Subproject commit 8d91e55a5744af0164e239745f560a7f9c6365f0 diff --git a/components/esp32/ld/esp32.rom.ld b/components/esp32/ld/esp32.rom.ld index c7e5eb2f7a..38c4d9da9c 100644 --- a/components/esp32/ld/esp32.rom.ld +++ b/components/esp32/ld/esp32.rom.ld @@ -89,6 +89,8 @@ PROVIDE ( esp_crc8 = 0x4005d144 ); PROVIDE ( _etext = 0x4000d66c ); PROVIDE ( ets_readySet_ = 0x3ffe01f0 ); PROVIDE ( ets_startup_callback = 0x3ffe0404 ); +PROVIDE ( rwip_coex_cfg = 0x3ff9914c ); +PROVIDE ( rwip_priority = 0x3ff99159 ); PROVIDE ( exc_cause_table = 0x3ff991d0 ); PROVIDE ( _exit_r = 0x4000bd28 ); PROVIDE ( free = 0x4000beb8 ); @@ -676,6 +678,9 @@ PROVIDE ( ld_sco_modify = 0x40031778 ); PROVIDE ( lm_cmd_cmp_send = 0x40051838 ); PROVIDE ( ld_sco_frm_cbk = 0x400349dc ); PROVIDE ( ld_acl_sniff_frm_cbk = 0x4003482c ); +PROVIDE ( ld_inq_end = 0x4003ab48 ); +PROVIDE ( ld_inq_sched = 0x4003aba4 ); +PROVIDE ( ld_inq_frm_cbk = 0x4003ae4c ); PROVIDE ( r_ld_acl_active_hop_types_get = 0x40036e10 ); PROVIDE ( r_ld_acl_afh_confirm = 0x40036d40 ); PROVIDE ( r_ld_acl_afh_prepare = 0x40036c84 ); From 6743820bce3b512b797b0b28e12178338d9448ba Mon Sep 17 00:00:00 2001 From: baohongde Date: Wed, 23 Jan 2019 18:04:01 +0800 Subject: [PATCH 2/2] components/bt: Add precautions for esp_vhci_host_send_packet (backport 3.1) --- components/bt/include/esp_bt.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/bt/include/esp_bt.h b/components/bt/include/esp_bt.h index 06636d1771..c3c1cb020a 100644 --- a/components/bt/include/esp_bt.h +++ b/components/bt/include/esp_bt.h @@ -43,7 +43,7 @@ typedef struct { } esp_bt_controller_config_t; #ifdef CONFIG_BT_ENABLED -/* While scanning, if the free memory value in controller is less than SCAN_SEND_ADV_RESERVED_SIZE, +/* While scanning, if the free memory value in controller is less than SCAN_SEND_ADV_RESERVED_SIZE, the adv packet will be discarded until the memory is restored. */ #define SCAN_SEND_ADV_RESERVED_SIZE 1000 /* enable controller log debug when adv lost */ @@ -285,8 +285,12 @@ bool esp_vhci_host_check_send_available(void); /** @brief esp_vhci_host_send_packet * host send packet to controller + * + * Should not call this function from within a critical section + * or when the scheduler is suspended. + * * @param data the packet point - *,@param len the packet length + * @param len the packet length */ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len);