mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-23 04:47:56 +00:00
MYNEWT-687: Reduce encryption scratchpad size on nrf51
The nrf51 only required the maximum encrypted packet length (plus 16) for its encryption scratchpad register. The code was using the max PDU length of 251. The nrf51 can only support 27 byte encrypted frames. X-Original-Commit: e7934fafce21fd27138fd9e15373ce44e30da682
This commit is contained in:
@@ -161,9 +161,8 @@ STATS_NAME_END(ble_phy_stats)
|
||||
*/
|
||||
|
||||
#if (MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION) == 1)
|
||||
/* XXX: test this. only needs 43 bytes. Should just not use the macro for this*/
|
||||
/* Per nordic, the number of bytes needed for scratch is 16 + MAX_PKT_SIZE */
|
||||
#define NRF_ENC_SCRATCH_WORDS (((MYNEWT_VAL(BLE_LL_MAX_PKT_SIZE) + 16) + 3) / 4)
|
||||
/* Per nordic, the number of bytes needed for scratch is 16 + MAX_PKT_SIZE. */
|
||||
#define NRF_ENC_SCRATCH_WORDS (((NRF_MAX_ENCRYPTED_PYLD_LEN + 16) + 3) / 4)
|
||||
|
||||
uint32_t g_nrf_encrypt_scratchpad[NRF_ENC_SCRATCH_WORDS];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user