nimble/ll: Fix handling LL_PAUSE_ENC_REQ
Nimble incorretly was trying to handle LL_PAUSE_ENC_RSP in a Slave role.
This patch fixes it.
This fixes LL/PAC/SLA/BI-01-C
@@ -3990,7 +3990,8 @@ chk_rx_terminate_ind:
/* A slave always replies */
reply = 1;
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
- if (is_ctrl && (opcode == BLE_LL_CTRL_PAUSE_ENC_RSP)) {
+ if (is_ctrl && (opcode == BLE_LL_CTRL_PAUSE_ENC_REQ)
+ && (rx_pyld_len == (1 + BLE_LL_CTRL_PAUSE_ENC_REQ_LEN))) {
connsm->enc_data.enc_state = CONN_ENC_S_PAUSED;
}
#endif
