diff --git a/nimble/controller/include/controller/ble_ll_ctrl.h b/nimble/controller/include/controller/ble_ll_ctrl.h index 0b042a2af..90156d51d 100644 --- a/nimble/controller/include/controller/ble_ll_ctrl.h +++ b/nimble/controller/include/controller/ble_ll_ctrl.h @@ -253,7 +253,7 @@ uint8_t ble_ll_ctrl_conn_param_reply(struct ble_ll_conn_sm *connsm, struct ble_ll_conn_params *req); int ble_ll_ctrl_reject_ind_send(struct ble_ll_conn_sm *connsm, uint8_t rej_opcode, uint8_t err); -int ble_ll_ctrl_start_enc_send(struct ble_ll_conn_sm *connsm, uint8_t opcode); +int ble_ll_ctrl_start_enc_send(struct ble_ll_conn_sm *connsm); int ble_ll_ctrl_enc_allowed_pdu_rx(struct os_mbuf *rxpdu); int ble_ll_ctrl_enc_allowed_pdu_tx(struct os_mbuf_pkthdr *pkthdr); int ble_ll_ctrl_tx_done(struct os_mbuf *txpdu, struct ble_ll_conn_sm *connsm); diff --git a/nimble/controller/src/ble_ll_conn_hci.c b/nimble/controller/src/ble_ll_conn_hci.c index 92039e4c4..526bad00d 100644 --- a/nimble/controller/src/ble_ll_conn_hci.c +++ b/nimble/controller/src/ble_ll_conn_hci.c @@ -1362,7 +1362,7 @@ ble_ll_conn_hci_le_ltk_reply(uint8_t *cmdbuf, uint8_t *rspbuf, uint8_t *rsplen) swap_buf(connsm->enc_data.enc_block.key, cmdbuf + 2, 16); ble_ll_calc_session_key(connsm); - ble_ll_ctrl_start_enc_send(connsm, BLE_LL_CTRL_START_ENC_REQ); + ble_ll_ctrl_start_enc_send(connsm); rc = BLE_ERR_SUCCESS; ltk_key_cmd_complete: diff --git a/nimble/controller/src/ble_ll_ctrl.c b/nimble/controller/src/ble_ll_ctrl.c index b7d28404c..dea90eeb1 100644 --- a/nimble/controller/src/ble_ll_ctrl.c +++ b/nimble/controller/src/ble_ll_ctrl.c @@ -1119,7 +1119,7 @@ ble_ll_ctrl_is_start_enc_rsp(struct os_mbuf *txpdu) } /** - * Called to create and send a LL_START_ENC_REQ or LL_START_ENC_RSP + * Called to create and send a LL_START_ENC_REQ * * @param connsm * @param err @@ -1127,7 +1127,7 @@ ble_ll_ctrl_is_start_enc_rsp(struct os_mbuf *txpdu) * @return int */ int -ble_ll_ctrl_start_enc_send(struct ble_ll_conn_sm *connsm, uint8_t opcode) +ble_ll_ctrl_start_enc_send(struct ble_ll_conn_sm *connsm) { int rc; struct os_mbuf *om; @@ -1135,7 +1135,7 @@ ble_ll_ctrl_start_enc_send(struct ble_ll_conn_sm *connsm, uint8_t opcode) om = os_msys_get_pkthdr(BLE_LL_CTRL_MAX_PDU_LEN, sizeof(struct ble_mbuf_hdr)); if (om) { - om->om_data[0] = opcode; + om->om_data[0] = BLE_LL_CTRL_START_ENC_REQ; ble_ll_conn_enqueue_pkt(connsm, om, BLE_LL_LLID_CTRL, 1); rc = 0; } else {