Skip to content

Commit f3869e7

Browse files
committed
Update NimBLE core to esp-nimble @f322e78.
* espressif/esp-nimble@f322e78
1 parent 8e2c4e4 commit f3869e7

File tree

12 files changed

+507
-43
lines changed

12 files changed

+507
-43
lines changed

src/nimble/nimble/host/src/ble_hs_resolv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ ble_rpa_remove_peer_dev_rec(struct ble_hs_dev_records *p_dev_rec)
9797
if ((i != ble_store_num_peer_dev_rec) && (ble_store_num_peer_dev_rec != 0)) {
9898
memmove(&peer_dev_rec[i], &peer_dev_rec[i + 1],
9999
(ble_store_num_peer_dev_rec - i) * sizeof(struct ble_hs_dev_records ));
100+
memset(&peer_dev_rec[ble_store_num_peer_dev_rec], 0, sizeof(struct ble_hs_dev_records));
100101
}
101102

102103
BLE_HS_LOG(DEBUG, " RPA: removed device at index = %d, no. of peer records"

src/nimble/nimble/host/src/ble_sm_alg.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,10 @@ mbedtls_gen_keypair(uint8_t *public_key, uint8_t *private_key)
643643

644644
mbedtls_entropy_init(&entropy);
645645
mbedtls_ctr_drbg_init(&ctr_drbg);
646+
647+
/* Free the previously allocate keypair */
648+
mbedtls_ecp_keypair_free(&keypair);
649+
646650
mbedtls_ecp_keypair_init(&keypair);
647651

648652
if (( rc = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy,
@@ -679,6 +683,11 @@ mbedtls_gen_keypair(uint8_t *public_key, uint8_t *private_key)
679683

680684
return 0;
681685
}
686+
687+
void mbedtls_free_keypair(void)
688+
{
689+
mbedtls_ecp_keypair_free(&keypair);
690+
}
682691
#endif
683692

684693
/**

src/nimble/nimble/host/util/src/addr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ ble_hs_util_load_rand_addr(ble_addr_t *addr)
4545
#if SOC_ESP_NIMBLE_CONTROLLER
4646
int rc;
4747

48-
rc = esp_ble_hw_get_static_addr(addr);
48+
rc = esp_ble_hw_get_static_addr((esp_ble_addr_t *)addr);
4949
if (rc == 0) {
5050
return 0;
5151
}

src/nimble/nimble/include/nimble/ble_hci_trans.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ struct os_mbuf;
6666
typedef int ble_hci_trans_rx_cmd_fn(uint8_t *cmd, void *arg);
6767
typedef int ble_hci_trans_rx_acl_fn(struct os_mbuf *om, void *arg);
6868

69-
#if CONFIG_IDF_TARGET_ESP32H2
69+
#if CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C2
7070
struct ble_hci_trans_funcs_t {
7171
int(*_ble_hci_trans_hs_acl_tx)(struct os_mbuf *om);
7272
int(*_ble_hci_trans_hs_cmd_tx)(uint8_t *cmd);

src/nimble/porting/nimble/include/nimble/nimble_port.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
#define NIMBLE_HS_STACK_SIZE (CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE / 4)
3232
#endif
3333

34-
#if (CONFIG_IDF_TARGET_ESP32H2)
35-
#define NIMBLE_LL_STACK_SIZE CONFIG_BT_NIMBLE_CONTROLLER_TASK_STACK_SIZE
34+
#if (CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C2)
35+
#define NIMBLE_LL_STACK_SIZE CONFIG_BT_LE_CONTROLLER_TASK_STACK_SIZE
3636
#endif
3737

3838
#ifdef __cplusplus

src/nimble/porting/nimble/include/syscfg/syscfg.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66
#define H_SYSCFG_
77

88
#ifdef ESP_PLATFORM
9-
#include "nimble/esp_port/port/include/esp_nimble_cfg.h"
9+
# include "nimble/esp_port/port/include/esp_nimble_cfg.h"
1010
#else
11-
#include "ext_nimble_config.h"
11+
# include "ext_nimble_config.h"
12+
# ifndef CONFIG_BT_NIMBLE_ENABLED
13+
# define CONFIG_BT_NIMBLE_ENABLED 1
14+
# endif
1215
#endif
1316

1417
#if 0

0 commit comments

Comments
 (0)