Lines Matching refs:pdu

186 	struct pdu_data *pdu;  in llcp_lp_enc_tx()  local
192 pdu = (struct pdu_data *)tx->pdu; in llcp_lp_enc_tx()
197 llcp_pdu_encode_enc_req(ctx, pdu); in llcp_lp_enc_tx()
200 llcp_pdu_encode_start_enc_rsp(pdu); in llcp_lp_enc_tx()
203 llcp_pdu_encode_pause_enc_req(pdu); in llcp_lp_enc_tx()
206 llcp_pdu_encode_pause_enc_rsp(pdu); in llcp_lp_enc_tx()
212 ctx->tx_opcode = pdu->llctrl.opcode; in llcp_lp_enc_tx()
226 struct pdu_data *pdu; in lp_enc_ntf() local
235 pdu = (struct pdu_data *)ntf->pdu; in lp_enc_ntf()
241 llcp_pdu_encode_start_enc_rsp(pdu); in lp_enc_ntf()
250 llcp_pdu_encode_reject_ind(pdu, ctx->data.enc.error); in lp_enc_ntf()
261 static void lp_enc_store_m(struct ll_conn *conn, struct proc_ctx *ctx, struct pdu_data *pdu) in lp_enc_store_m() argument
264 memcpy(&ctx->data.enc.skd[0], pdu->llctrl.enc_req.skdm, sizeof(pdu->llctrl.enc_req.skdm)); in lp_enc_store_m()
269 memcpy(&conn->lll.ccm_rx.iv[0], pdu->llctrl.enc_req.ivm, sizeof(pdu->llctrl.enc_req.ivm)); in lp_enc_store_m()
281 lp_enc_store_m(conn, ctx, (struct pdu_data *)tx->pdu); in lp_enc_send_enc_req()
359 static void lp_enc_store_s(struct ll_conn *conn, struct proc_ctx *ctx, struct pdu_data *pdu) in lp_enc_store_s() argument
362 memcpy(&ctx->data.enc.skd[8], pdu->llctrl.enc_rsp.skds, sizeof(pdu->llctrl.enc_rsp.skds)); in lp_enc_store_s()
367 memcpy(&conn->lll.ccm_rx.iv[4], pdu->llctrl.enc_rsp.ivs, sizeof(pdu->llctrl.enc_rsp.ivs)); in lp_enc_store_s()
370 static inline uint8_t reject_error_code(struct pdu_data *pdu) in reject_error_code() argument
374 if (pdu->llctrl.opcode == PDU_DATA_LLCTRL_TYPE_REJECT_IND) { in reject_error_code()
375 error = pdu->llctrl.reject_ind.error_code; in reject_error_code()
377 } else if (pdu->llctrl.opcode == PDU_DATA_LLCTRL_TYPE_REJECT_EXT_IND) { in reject_error_code()
378 error = pdu->llctrl.reject_ext_ind.error_code; in reject_error_code()
400 struct pdu_data *pdu = (struct pdu_data *)param; in lp_enc_st_wait_rx_enc_rsp() local
406 lp_enc_store_s(conn, ctx, pdu); in lp_enc_st_wait_rx_enc_rsp()
427 ctx->data.enc.error = reject_error_code(pdu); in lp_enc_st_wait_rx_enc_rsp()
444 struct pdu_data *pdu = (struct pdu_data *)param; in lp_enc_st_wait_rx_start_enc_req() local
457 ctx->data.enc.error = reject_error_code(pdu); in lp_enc_st_wait_rx_start_enc_req()
648 struct pdu_data *pdu = (struct pdu_data *)rx->pdu; in llcp_lp_enc_rx() local
650 switch (pdu->llctrl.opcode) { in llcp_lp_enc_rx()
652 lp_enc_execute_fsm(conn, ctx, LP_ENC_EVT_ENC_RSP, pdu); in llcp_lp_enc_rx()
655 lp_enc_execute_fsm(conn, ctx, LP_ENC_EVT_START_ENC_REQ, pdu); in llcp_lp_enc_rx()
658 lp_enc_execute_fsm(conn, ctx, LP_ENC_EVT_START_ENC_RSP, pdu); in llcp_lp_enc_rx()
662 lp_enc_execute_fsm(conn, ctx, LP_ENC_EVT_REJECT, pdu); in llcp_lp_enc_rx()
665 lp_enc_execute_fsm(conn, ctx, LP_ENC_EVT_PAUSE_ENC_RSP, pdu); in llcp_lp_enc_rx()
704 struct pdu_data *pdu; in llcp_rp_enc_tx() local
710 pdu = (struct pdu_data *)tx->pdu; in llcp_rp_enc_tx()
715 llcp_pdu_encode_enc_rsp(pdu); in llcp_rp_enc_tx()
718 llcp_pdu_encode_start_enc_req(pdu); in llcp_rp_enc_tx()
721 llcp_pdu_encode_start_enc_rsp(pdu); in llcp_rp_enc_tx()
724 llcp_pdu_encode_pause_enc_rsp(pdu); in llcp_rp_enc_tx()
728 llcp_pdu_encode_reject_ext_ind(pdu, ctx->reject_ext_ind.reject_opcode, in llcp_rp_enc_tx()
731 llcp_pdu_encode_reject_ind(pdu, ctx->reject_ext_ind.error_code); in llcp_rp_enc_tx()
738 ctx->tx_opcode = pdu->llctrl.opcode; in llcp_rp_enc_tx()
752 struct pdu_data *pdu; in rp_enc_ntf_ltk() local
764 pdu = (struct pdu_data *)ntf->pdu; in rp_enc_ntf_ltk()
766 llcp_ntf_encode_enc_req(ctx, pdu); in rp_enc_ntf_ltk()
778 struct pdu_data *pdu; in rp_enc_ntf() local
787 pdu = (struct pdu_data *)ntf->pdu; in rp_enc_ntf()
792 llcp_pdu_encode_start_enc_rsp(pdu); in rp_enc_ntf()
811 static void rp_enc_store_s(struct ll_conn *conn, struct proc_ctx *ctx, struct pdu_data *pdu) in rp_enc_store_s() argument
814 memcpy(&ctx->data.enc.skds, pdu->llctrl.enc_rsp.skds, sizeof(pdu->llctrl.enc_rsp.skds)); in rp_enc_store_s()
819 memcpy(&conn->lll.ccm_rx.iv[4], pdu->llctrl.enc_rsp.ivs, sizeof(pdu->llctrl.enc_rsp.ivs)); in rp_enc_store_s()
833 rp_enc_store_s(conn, ctx, (struct pdu_data *)tx->pdu); in rp_enc_send_enc_rsp()
931 static void rp_enc_store_m(struct ll_conn *conn, struct proc_ctx *ctx, struct pdu_data *pdu) in rp_enc_store_m() argument
934 memcpy(ctx->data.enc.rand, pdu->llctrl.enc_req.rand, sizeof(ctx->data.enc.rand)); in rp_enc_store_m()
937 ctx->data.enc.ediv[0] = pdu->llctrl.enc_req.ediv[0]; in rp_enc_store_m()
938 ctx->data.enc.ediv[1] = pdu->llctrl.enc_req.ediv[1]; in rp_enc_store_m()
941 memcpy(&ctx->data.enc.skdm, pdu->llctrl.enc_req.skdm, sizeof(ctx->data.enc.skdm)); in rp_enc_store_m()
947 memcpy(&conn->lll.ccm_rx.iv[0], pdu->llctrl.enc_req.ivm, sizeof(pdu->llctrl.enc_req.ivm)); in rp_enc_store_m()
1241 struct pdu_data *pdu = (struct pdu_data *)rx->pdu; in llcp_rp_enc_rx() local
1243 switch (pdu->llctrl.opcode) { in llcp_rp_enc_rx()
1245 rp_enc_execute_fsm(conn, ctx, RP_ENC_EVT_ENC_REQ, pdu); in llcp_rp_enc_rx()
1248 rp_enc_execute_fsm(conn, ctx, RP_ENC_EVT_START_ENC_RSP, pdu); in llcp_rp_enc_rx()
1251 rp_enc_execute_fsm(conn, ctx, RP_ENC_EVT_PAUSE_ENC_REQ, pdu); in llcp_rp_enc_rx()
1254 rp_enc_execute_fsm(conn, ctx, RP_ENC_EVT_PAUSE_ENC_RSP, pdu); in llcp_rp_enc_rx()