From 035365f033ccaf6212313144b1ec26279ccb4230 Mon Sep 17 00:00:00 2001 From: Prasad Alatkar Date: Fri, 20 Mar 2020 20:50:59 +0800 Subject: [PATCH] NimBLE: Fix build failures due to non static declarations in RPA feature Closes IDFGH-2891 --- nimble/host/src/ble_hs_priv.h | 5 ----- nimble/host/src/ble_hs_resolv_priv.h | 2 ++ nimble/host/src/ble_sm_priv.h | 5 +++++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/nimble/host/src/ble_hs_priv.h b/nimble/host/src/ble_hs_priv.h index 89e678ff2..d8949cbc9 100644 --- a/nimble/host/src/ble_hs_priv.h +++ b/nimble/host/src/ble_hs_priv.h @@ -129,11 +129,6 @@ void ble_hs_notifications_sched(void); struct ble_npl_eventq *ble_hs_evq_get(void); void ble_hs_stop_init(void); -int -ble_sm_alg_encrypt(const uint8_t *key, const uint8_t *plaintext, - uint8_t *enc_data); - - struct ble_mqueue { STAILQ_HEAD(, os_mbuf_pkthdr) head; struct ble_npl_event ev; diff --git a/nimble/host/src/ble_hs_resolv_priv.h b/nimble/host/src/ble_hs_resolv_priv.h index 65e0f6e95..568aa89ab 100644 --- a/nimble/host/src/ble_hs_resolv_priv.h +++ b/nimble/host/src/ble_hs_resolv_priv.h @@ -37,8 +37,10 @@ struct ble_hs_resolv_entry { uint8_t rl_peer_rpa[BLE_DEV_ADDR_LEN]; }; +#if MYNEWT_VAL(BLE_STORE_CONFIG_PERSIST) /* Persist peer records in NVS. XXX Need to handle this in `store` module */ int ble_store_persist_peer_records(void); +#endif struct ble_hs_peer_sec { ble_addr_t peer_addr; diff --git a/nimble/host/src/ble_sm_priv.h b/nimble/host/src/ble_sm_priv.h index 5e761c1e1..effc6f9b2 100644 --- a/nimble/host/src/ble_sm_priv.h +++ b/nimble/host/src/ble_sm_priv.h @@ -395,6 +395,8 @@ int ble_sm_slave_initiate(uint16_t conn_handle); int ble_sm_enc_initiate(uint16_t conn_handle, uint8_t key_size, const uint8_t *ltk, uint16_t ediv, uint64_t rand_val, int auth); +int ble_sm_alg_encrypt(const uint8_t *key, const uint8_t *plaintext, + uint8_t *enc_data); int ble_sm_init(void); #else @@ -411,6 +413,9 @@ int ble_sm_init(void); #define ble_sm_init() 0 +#define ble_sm_alg_encrypt(key, plaintext, enc_data) \ + BLE_HS_ENOTSUP + #endif struct ble_l2cap_chan *ble_sm_create_chan(uint16_t handle);