Lines Matching refs:pdu

69 void llcp_pdu_encode_ping_req(struct pdu_data *pdu)  in llcp_pdu_encode_ping_req()  argument
71 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_ping_req()
72 pdu->len = PDU_DATA_LLCTRL_LEN(ping_req); in llcp_pdu_encode_ping_req()
73 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_PING_REQ; in llcp_pdu_encode_ping_req()
76 void llcp_pdu_encode_ping_rsp(struct pdu_data *pdu) in llcp_pdu_encode_ping_rsp() argument
78 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_ping_rsp()
79 pdu->len = PDU_DATA_LLCTRL_LEN(ping_rsp); in llcp_pdu_encode_ping_rsp()
80 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_PING_RSP; in llcp_pdu_encode_ping_rsp()
87 void llcp_pdu_encode_unknown_rsp(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_unknown_rsp() argument
89 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_unknown_rsp()
90 pdu->len = PDU_DATA_LLCTRL_LEN(unknown_rsp); in llcp_pdu_encode_unknown_rsp()
91 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_UNKNOWN_RSP; in llcp_pdu_encode_unknown_rsp()
93 pdu->llctrl.unknown_rsp.type = ctx->unknown_response.type; in llcp_pdu_encode_unknown_rsp()
96 void llcp_pdu_decode_unknown_rsp(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_unknown_rsp() argument
98 ctx->unknown_response.type = pdu->llctrl.unknown_rsp.type; in llcp_pdu_decode_unknown_rsp()
101 void llcp_ntf_encode_unknown_rsp(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_ntf_encode_unknown_rsp() argument
105 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_ntf_encode_unknown_rsp()
106 pdu->len = PDU_DATA_LLCTRL_LEN(unknown_rsp); in llcp_ntf_encode_unknown_rsp()
107 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_UNKNOWN_RSP; in llcp_ntf_encode_unknown_rsp()
108 p = &pdu->llctrl.unknown_rsp; in llcp_ntf_encode_unknown_rsp()
132 void llcp_pdu_encode_feature_req(struct ll_conn *conn, struct pdu_data *pdu) in llcp_pdu_encode_feature_req() argument
136 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_feature_req()
137 pdu->len = PDU_DATA_LLCTRL_LEN(feature_req); in llcp_pdu_encode_feature_req()
138 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_FEATURE_REQ; in llcp_pdu_encode_feature_req()
142 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_PER_INIT_FEAT_XCHG; in llcp_pdu_encode_feature_req()
146 p = &pdu->llctrl.feature_req; in llcp_pdu_encode_feature_req()
150 void llcp_pdu_encode_feature_rsp(struct ll_conn *conn, struct pdu_data *pdu) in llcp_pdu_encode_feature_rsp() argument
155 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_feature_rsp()
156 pdu->len = PDU_DATA_LLCTRL_LEN(feature_rsp); in llcp_pdu_encode_feature_rsp()
157 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_FEATURE_RSP; in llcp_pdu_encode_feature_rsp()
159 p = &pdu->llctrl.feature_rsp; in llcp_pdu_encode_feature_rsp()
170 void llcp_ntf_encode_feature_rsp(struct ll_conn *conn, struct pdu_data *pdu) in llcp_ntf_encode_feature_rsp() argument
174 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_ntf_encode_feature_rsp()
175 pdu->len = PDU_DATA_LLCTRL_LEN(feature_rsp); in llcp_ntf_encode_feature_rsp()
176 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_FEATURE_RSP; in llcp_ntf_encode_feature_rsp()
177 p = &pdu->llctrl.feature_rsp; in llcp_ntf_encode_feature_rsp()
196 void llcp_pdu_decode_feature_req(struct ll_conn *conn, struct pdu_data *pdu) in llcp_pdu_decode_feature_req() argument
200 feature_filter(pdu->llctrl.feature_req.features, &featureset); in llcp_pdu_decode_feature_req()
209 void llcp_pdu_decode_feature_rsp(struct ll_conn *conn, struct pdu_data *pdu) in llcp_pdu_decode_feature_rsp() argument
213 feature_filter(pdu->llctrl.feature_rsp.features, &featureset); in llcp_pdu_decode_feature_rsp()
224 void llcp_pdu_encode_min_used_chans_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_min_used_chans_ind() argument
228 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_min_used_chans_ind()
229 pdu->len = PDU_DATA_LLCTRL_LEN(min_used_chans_ind); in llcp_pdu_encode_min_used_chans_ind()
230 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_MIN_USED_CHAN_IND; in llcp_pdu_encode_min_used_chans_ind()
231 p = &pdu->llctrl.min_used_chans_ind; in llcp_pdu_encode_min_used_chans_ind()
238 void llcp_pdu_decode_min_used_chans_ind(struct ll_conn *conn, struct pdu_data *pdu) in llcp_pdu_decode_min_used_chans_ind() argument
240 conn->llcp.muc.phys = pdu->llctrl.min_used_chans_ind.phys; in llcp_pdu_decode_min_used_chans_ind()
241 conn->llcp.muc.min_used_chans = pdu->llctrl.min_used_chans_ind.min_used_chans; in llcp_pdu_decode_min_used_chans_ind()
249 void llcp_pdu_encode_terminate_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_terminate_ind() argument
253 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_terminate_ind()
254 pdu->len = PDU_DATA_LLCTRL_LEN(terminate_ind); in llcp_pdu_encode_terminate_ind()
255 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_TERMINATE_IND; in llcp_pdu_encode_terminate_ind()
256 p = &pdu->llctrl.terminate_ind; in llcp_pdu_encode_terminate_ind()
260 void llcp_pdu_decode_terminate_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_terminate_ind() argument
262 ctx->data.term.error_code = pdu->llctrl.terminate_ind.error_code; in llcp_pdu_decode_terminate_ind()
268 void llcp_pdu_encode_version_ind(struct pdu_data *pdu) in llcp_pdu_encode_version_ind() argument
274 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_version_ind()
275 pdu->len = PDU_DATA_LLCTRL_LEN(version_ind); in llcp_pdu_encode_version_ind()
276 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_VERSION_IND; in llcp_pdu_encode_version_ind()
278 p = &pdu->llctrl.version_ind; in llcp_pdu_encode_version_ind()
286 void llcp_ntf_encode_version_ind(struct ll_conn *conn, struct pdu_data *pdu) in llcp_ntf_encode_version_ind() argument
290 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_ntf_encode_version_ind()
291 pdu->len = PDU_DATA_LLCTRL_LEN(version_ind); in llcp_ntf_encode_version_ind()
292 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_VERSION_IND; in llcp_ntf_encode_version_ind()
294 p = &pdu->llctrl.version_ind; in llcp_ntf_encode_version_ind()
300 void llcp_pdu_decode_version_ind(struct ll_conn *conn, struct pdu_data *pdu) in llcp_pdu_decode_version_ind() argument
303 conn->llcp.vex.cached.version_number = pdu->llctrl.version_ind.version_number; in llcp_pdu_decode_version_ind()
304 conn->llcp.vex.cached.company_id = sys_le16_to_cpu(pdu->llctrl.version_ind.company_id); in llcp_pdu_decode_version_ind()
306 sys_le16_to_cpu(pdu->llctrl.version_ind.sub_version_number); in llcp_pdu_decode_version_ind()
324 static void encode_enc_req(struct proc_ctx *ctx, struct pdu_data *pdu) in encode_enc_req() argument
328 pdu->ll_id = PDU_DATA_LLID_CTRL; in encode_enc_req()
329 pdu->len = PDU_DATA_LLCTRL_LEN(enc_req); in encode_enc_req()
330 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_ENC_REQ; in encode_enc_req()
332 p = &pdu->llctrl.enc_req; in encode_enc_req()
340 void llcp_pdu_encode_enc_req(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_enc_req() argument
344 encode_enc_req(ctx, pdu); in llcp_pdu_encode_enc_req()
347 p = &pdu->llctrl.enc_req; in llcp_pdu_encode_enc_req()
357 void llcp_ntf_encode_enc_req(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_ntf_encode_enc_req() argument
359 encode_enc_req(ctx, pdu); in llcp_ntf_encode_enc_req()
362 void llcp_pdu_encode_enc_rsp(struct pdu_data *pdu) in llcp_pdu_encode_enc_rsp() argument
366 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_enc_rsp()
367 pdu->len = PDU_DATA_LLCTRL_LEN(enc_rsp); in llcp_pdu_encode_enc_rsp()
368 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_ENC_RSP; in llcp_pdu_encode_enc_rsp()
370 p = &pdu->llctrl.enc_rsp; in llcp_pdu_encode_enc_rsp()
378 void llcp_pdu_encode_start_enc_req(struct pdu_data *pdu) in llcp_pdu_encode_start_enc_req() argument
380 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_start_enc_req()
381 pdu->len = PDU_DATA_LLCTRL_LEN(start_enc_req); in llcp_pdu_encode_start_enc_req()
382 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_START_ENC_REQ; in llcp_pdu_encode_start_enc_req()
386 void llcp_pdu_encode_start_enc_rsp(struct pdu_data *pdu) in llcp_pdu_encode_start_enc_rsp() argument
388 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_start_enc_rsp()
389 pdu->len = PDU_DATA_LLCTRL_LEN(start_enc_rsp); in llcp_pdu_encode_start_enc_rsp()
390 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_START_ENC_RSP; in llcp_pdu_encode_start_enc_rsp()
394 void llcp_pdu_encode_pause_enc_req(struct pdu_data *pdu) in llcp_pdu_encode_pause_enc_req() argument
396 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_pause_enc_req()
397 pdu->len = PDU_DATA_LLCTRL_LEN(pause_enc_req); in llcp_pdu_encode_pause_enc_req()
398 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_PAUSE_ENC_REQ; in llcp_pdu_encode_pause_enc_req()
402 void llcp_pdu_encode_pause_enc_rsp(struct pdu_data *pdu) in llcp_pdu_encode_pause_enc_rsp() argument
404 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_pause_enc_rsp()
405 pdu->len = PDU_DATA_LLCTRL_LEN(pause_enc_rsp); in llcp_pdu_encode_pause_enc_rsp()
406 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_PAUSE_ENC_RSP; in llcp_pdu_encode_pause_enc_rsp()
410 void llcp_pdu_encode_reject_ind(struct pdu_data *pdu, uint8_t error_code) in llcp_pdu_encode_reject_ind() argument
412 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_reject_ind()
413 pdu->len = PDU_DATA_LLCTRL_LEN(reject_ind); in llcp_pdu_encode_reject_ind()
414 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_REJECT_IND; in llcp_pdu_encode_reject_ind()
415 pdu->llctrl.reject_ind.error_code = error_code; in llcp_pdu_encode_reject_ind()
418 void llcp_pdu_encode_reject_ext_ind(struct pdu_data *pdu, uint8_t reject_opcode, uint8_t error_code) in llcp_pdu_encode_reject_ext_ind() argument
420 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_reject_ext_ind()
421 pdu->len = PDU_DATA_LLCTRL_LEN(reject_ext_ind); in llcp_pdu_encode_reject_ext_ind()
422 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_REJECT_EXT_IND; in llcp_pdu_encode_reject_ext_ind()
423 pdu->llctrl.reject_ext_ind.reject_opcode = reject_opcode; in llcp_pdu_encode_reject_ext_ind()
424 pdu->llctrl.reject_ext_ind.error_code = error_code; in llcp_pdu_encode_reject_ext_ind()
427 void llcp_pdu_decode_reject_ext_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_reject_ext_ind() argument
429 ctx->reject_ext_ind.reject_opcode = pdu->llctrl.reject_ext_ind.reject_opcode; in llcp_pdu_decode_reject_ext_ind()
430 ctx->reject_ext_ind.error_code = pdu->llctrl.reject_ext_ind.error_code; in llcp_pdu_decode_reject_ext_ind()
433 void llcp_ntf_encode_reject_ext_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_ntf_encode_reject_ext_ind() argument
437 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_ntf_encode_reject_ext_ind()
438 pdu->len = PDU_DATA_LLCTRL_LEN(reject_ext_ind); in llcp_ntf_encode_reject_ext_ind()
439 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_REJECT_EXT_IND; in llcp_ntf_encode_reject_ext_ind()
441 p = (void *)&pdu->llctrl.reject_ext_ind; in llcp_ntf_encode_reject_ext_ind()
451 void llcp_pdu_encode_phy_req(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_phy_req() argument
453 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_phy_req()
454 pdu->len = PDU_DATA_LLCTRL_LEN(phy_req); in llcp_pdu_encode_phy_req()
455 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_PHY_REQ; in llcp_pdu_encode_phy_req()
456 pdu->llctrl.phy_req.rx_phys = ctx->data.pu.rx; in llcp_pdu_encode_phy_req()
457 pdu->llctrl.phy_req.tx_phys = ctx->data.pu.tx; in llcp_pdu_encode_phy_req()
460 void llcp_pdu_decode_phy_req(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_phy_req() argument
462 ctx->data.pu.rx = pdu->llctrl.phy_req.tx_phys; in llcp_pdu_decode_phy_req()
463 ctx->data.pu.tx = pdu->llctrl.phy_req.rx_phys; in llcp_pdu_decode_phy_req()
467 void llcp_pdu_encode_phy_rsp(struct ll_conn *conn, struct pdu_data *pdu) in llcp_pdu_encode_phy_rsp() argument
469 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_phy_rsp()
470 pdu->len = PDU_DATA_LLCTRL_LEN(phy_rsp); in llcp_pdu_encode_phy_rsp()
471 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_PHY_RSP; in llcp_pdu_encode_phy_rsp()
472 pdu->llctrl.phy_rsp.rx_phys = conn->phy_pref_rx; in llcp_pdu_encode_phy_rsp()
473 pdu->llctrl.phy_rsp.tx_phys = conn->phy_pref_tx; in llcp_pdu_encode_phy_rsp()
475 void llcp_pdu_decode_phy_update_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_phy_update_ind() argument
477 ctx->data.pu.instant = sys_le16_to_cpu(pdu->llctrl.phy_upd_ind.instant); in llcp_pdu_decode_phy_update_ind()
478 ctx->data.pu.c_to_p_phy = pdu->llctrl.phy_upd_ind.c_to_p_phy; in llcp_pdu_decode_phy_update_ind()
479 ctx->data.pu.p_to_c_phy = pdu->llctrl.phy_upd_ind.p_to_c_phy; in llcp_pdu_decode_phy_update_ind()
484 void llcp_pdu_encode_phy_update_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_phy_update_ind() argument
486 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_phy_update_ind()
487 pdu->len = PDU_DATA_LLCTRL_LEN(phy_upd_ind); in llcp_pdu_encode_phy_update_ind()
488 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_PHY_UPD_IND; in llcp_pdu_encode_phy_update_ind()
489 pdu->llctrl.phy_upd_ind.instant = sys_cpu_to_le16(ctx->data.pu.instant); in llcp_pdu_encode_phy_update_ind()
490 pdu->llctrl.phy_upd_ind.c_to_p_phy = ctx->data.pu.c_to_p_phy; in llcp_pdu_encode_phy_update_ind()
491 pdu->llctrl.phy_upd_ind.p_to_c_phy = ctx->data.pu.p_to_c_phy; in llcp_pdu_encode_phy_update_ind()
493 void llcp_pdu_decode_phy_rsp(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_phy_rsp() argument
495 ctx->data.pu.rx = pdu->llctrl.phy_rsp.tx_phys; in llcp_pdu_decode_phy_rsp()
496 ctx->data.pu.tx = pdu->llctrl.phy_rsp.rx_phys; in llcp_pdu_decode_phy_rsp()
505 static void encode_conn_param_req_rsp_common(struct proc_ctx *ctx, struct pdu_data *pdu, in encode_conn_param_req_rsp_common() argument
509 pdu->ll_id = PDU_DATA_LLID_CTRL; in encode_conn_param_req_rsp_common()
511 pdu->len = sizeof(struct pdu_data_llctrl_conn_param_req_rsp_common) + 1U; in encode_conn_param_req_rsp_common()
512 pdu->llctrl.opcode = opcode; in encode_conn_param_req_rsp_common()
529 void llcp_pdu_encode_conn_param_req(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_conn_param_req() argument
531 encode_conn_param_req_rsp_common(ctx, pdu, in llcp_pdu_encode_conn_param_req()
532 (struct pdu_data_llctrl_conn_param_req_rsp_common *)&pdu->llctrl.conn_param_req, in llcp_pdu_encode_conn_param_req()
536 void llcp_pdu_encode_conn_param_rsp(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_conn_param_rsp() argument
538 encode_conn_param_req_rsp_common(ctx, pdu, in llcp_pdu_encode_conn_param_rsp()
539 (struct pdu_data_llctrl_conn_param_req_rsp_common *)&pdu->llctrl.conn_param_rsp, in llcp_pdu_encode_conn_param_rsp()
560 void llcp_pdu_decode_conn_param_req(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_conn_param_req() argument
563 (struct pdu_data_llctrl_conn_param_req_rsp_common *)&pdu->llctrl.conn_param_req); in llcp_pdu_decode_conn_param_req()
566 void llcp_pdu_decode_conn_param_rsp(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_conn_param_rsp() argument
569 (struct pdu_data_llctrl_conn_param_req_rsp_common *)&pdu->llctrl.conn_param_rsp); in llcp_pdu_decode_conn_param_rsp()
573 void llcp_pdu_encode_conn_update_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_conn_update_ind() argument
577 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_conn_update_ind()
578 pdu->len = PDU_DATA_LLCTRL_LEN(conn_update_ind); in llcp_pdu_encode_conn_update_ind()
579 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_CONN_UPDATE_IND; in llcp_pdu_encode_conn_update_ind()
581 p = (void *)&pdu->llctrl.conn_update_ind; in llcp_pdu_encode_conn_update_ind()
590 void llcp_pdu_decode_conn_update_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_conn_update_ind() argument
594 p = (void *)&pdu->llctrl.conn_update_ind; in llcp_pdu_decode_conn_update_ind()
606 void llcp_pdu_encode_chan_map_update_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_chan_map_update_ind() argument
610 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_chan_map_update_ind()
611 pdu->len = PDU_DATA_LLCTRL_LEN(chan_map_ind); in llcp_pdu_encode_chan_map_update_ind()
612 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_CHAN_MAP_IND; in llcp_pdu_encode_chan_map_update_ind()
613 p = &pdu->llctrl.chan_map_ind; in llcp_pdu_encode_chan_map_update_ind()
618 void llcp_pdu_decode_chan_map_update_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_chan_map_update_ind() argument
620 ctx->data.chmu.instant = sys_le16_to_cpu(pdu->llctrl.chan_map_ind.instant); in llcp_pdu_decode_chan_map_update_ind()
621 memcpy(ctx->data.chmu.chm, pdu->llctrl.chan_map_ind.chm, sizeof(ctx->data.chmu.chm)); in llcp_pdu_decode_chan_map_update_ind()
628 static void encode_length_req_rsp_common(struct pdu_data *pdu, in encode_length_req_rsp_common() argument
633 pdu->ll_id = PDU_DATA_LLID_CTRL; in encode_length_req_rsp_common()
635 pdu->len = sizeof(struct pdu_data_llctrl_length_req_rsp_common) + 1U; in encode_length_req_rsp_common()
636 pdu->llctrl.opcode = opcode; in encode_length_req_rsp_common()
643 void llcp_pdu_encode_length_req(struct ll_conn *conn, struct pdu_data *pdu) in llcp_pdu_encode_length_req() argument
645 encode_length_req_rsp_common(pdu, in llcp_pdu_encode_length_req()
646 (struct pdu_data_llctrl_length_req_rsp_common *)&pdu->llctrl.length_req, in llcp_pdu_encode_length_req()
651 void llcp_pdu_encode_length_rsp(struct ll_conn *conn, struct pdu_data *pdu) in llcp_pdu_encode_length_rsp() argument
653 encode_length_req_rsp_common(pdu, in llcp_pdu_encode_length_rsp()
654 (struct pdu_data_llctrl_length_req_rsp_common *)&pdu->llctrl.length_rsp, in llcp_pdu_encode_length_rsp()
659 void llcp_ntf_encode_length_change(struct ll_conn *conn, struct pdu_data *pdu) in llcp_ntf_encode_length_change() argument
661 encode_length_req_rsp_common(pdu, in llcp_ntf_encode_length_change()
662 (struct pdu_data_llctrl_length_req_rsp_common *)&pdu->llctrl.length_rsp, in llcp_ntf_encode_length_change()
720 void llcp_pdu_decode_length_req(struct ll_conn *conn, struct pdu_data *pdu) in llcp_pdu_decode_length_req() argument
723 (struct pdu_data_llctrl_length_req_rsp_common *)&pdu->llctrl.length_req); in llcp_pdu_decode_length_req()
726 void llcp_pdu_decode_length_rsp(struct ll_conn *conn, struct pdu_data *pdu) in llcp_pdu_decode_length_rsp() argument
729 (struct pdu_data_llctrl_length_req_rsp_common *)&pdu->llctrl.length_rsp); in llcp_pdu_decode_length_rsp()
737 void llcp_pdu_encode_cte_req(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_cte_req() argument
741 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_cte_req()
742 pdu->len = PDU_DATA_LLCTRL_LEN(cte_req); in llcp_pdu_encode_cte_req()
743 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_CTE_REQ; in llcp_pdu_encode_cte_req()
745 p = &pdu->llctrl.cte_req; in llcp_pdu_encode_cte_req()
751 void llcp_pdu_decode_cte_rsp(struct proc_ctx *ctx, const struct pdu_data *pdu) in llcp_pdu_decode_cte_rsp() argument
753 if (pdu->cp == 0U || pdu->octet3.cte_info.time == 0U) { in llcp_pdu_decode_cte_rsp()
760 void llcp_ntf_encode_cte_req(struct pdu_data *pdu) in llcp_ntf_encode_cte_req() argument
762 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_ntf_encode_cte_req()
763 pdu->len = PDU_DATA_LLCTRL_LEN(cte_rsp); in llcp_ntf_encode_cte_req()
764 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_CTE_RSP; in llcp_ntf_encode_cte_req()
767 pdu->cp = 0U; in llcp_ntf_encode_cte_req()
772 void llcp_pdu_decode_cte_req(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_cte_req() argument
774 ctx->data.cte_remote_req.min_cte_len = pdu->llctrl.cte_req.min_cte_len_req; in llcp_pdu_decode_cte_req()
775 ctx->data.cte_remote_req.cte_type = pdu->llctrl.cte_req.cte_type_req; in llcp_pdu_decode_cte_req()
778 void llcp_pdu_encode_cte_rsp(const struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_cte_rsp() argument
780 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_cte_rsp()
781 pdu->len = PDU_DATA_LLCTRL_LEN(cte_rsp); in llcp_pdu_encode_cte_rsp()
782 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_CTE_RSP; in llcp_pdu_encode_cte_rsp()
785 pdu->cp = 1U; in llcp_pdu_encode_cte_rsp()
786 pdu->rfu = 0U; in llcp_pdu_encode_cte_rsp()
788 pdu->octet3.cte_info.time = ctx->data.cte_remote_req.min_cte_len; in llcp_pdu_encode_cte_rsp()
789 pdu->octet3.cte_info.type = ctx->data.cte_remote_req.cte_type; in llcp_pdu_encode_cte_rsp()
794 void llcp_pdu_decode_cis_req(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_cis_req() argument
796 ctx->data.cis_create.cig_id = pdu->llctrl.cis_req.cig_id; in llcp_pdu_decode_cis_req()
797 ctx->data.cis_create.cis_id = pdu->llctrl.cis_req.cis_id; in llcp_pdu_decode_cis_req()
798 ctx->data.cis_create.cis_offset_min = sys_get_le24(pdu->llctrl.cis_req.cis_offset_min); in llcp_pdu_decode_cis_req()
799 ctx->data.cis_create.cis_offset_max = sys_get_le24(pdu->llctrl.cis_req.cis_offset_max); in llcp_pdu_decode_cis_req()
801 sys_le16_to_cpu(pdu->llctrl.cis_req.conn_event_count); in llcp_pdu_decode_cis_req()
802 ctx->data.cis_create.iso_interval = sys_le16_to_cpu(pdu->llctrl.cis_req.iso_interval); in llcp_pdu_decode_cis_req()
823 void llcp_pdu_decode_cis_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_cis_ind() argument
826 sys_le16_to_cpu(pdu->llctrl.cis_ind.conn_event_count); in llcp_pdu_decode_cis_ind()
832 void llcp_pdu_encode_cis_rsp(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_cis_rsp() argument
836 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_cis_rsp()
837 pdu->len = PDU_DATA_LLCTRL_LEN(cis_rsp); in llcp_pdu_encode_cis_rsp()
838 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_CIS_RSP; in llcp_pdu_encode_cis_rsp()
840 p = &pdu->llctrl.cis_rsp; in llcp_pdu_encode_cis_rsp()
848 void llcp_pdu_encode_cis_req(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_cis_req() argument
852 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_cis_req()
853 pdu->len = offsetof(struct pdu_data_llctrl, cis_req) + in llcp_pdu_encode_cis_req()
855 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_CIS_REQ; in llcp_pdu_encode_cis_req()
857 p = &pdu->llctrl.cis_req; in llcp_pdu_encode_cis_req()
887 void llcp_pdu_decode_cis_rsp(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_cis_rsp() argument
890 uint32_t cis_offset_min = sys_get_le24(pdu->llctrl.cis_rsp.cis_offset_min); in llcp_pdu_decode_cis_rsp()
891 uint32_t cis_offset_max = sys_get_le24(pdu->llctrl.cis_rsp.cis_offset_max); in llcp_pdu_decode_cis_rsp()
905 sys_le16_to_cpu(pdu->llctrl.cis_rsp.conn_event_count); in llcp_pdu_decode_cis_rsp()
908 void llcp_pdu_encode_cis_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_cis_ind() argument
912 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_cis_ind()
913 pdu->len = offsetof(struct pdu_data_llctrl, cis_ind) + in llcp_pdu_encode_cis_ind()
915 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_CIS_IND; in llcp_pdu_encode_cis_ind()
917 p = &pdu->llctrl.cis_ind; in llcp_pdu_encode_cis_ind()
933 void llcp_pdu_encode_cis_terminate_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_cis_terminate_ind() argument
937 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_cis_terminate_ind()
938 pdu->len = PDU_DATA_LLCTRL_LEN(cis_terminate_ind); in llcp_pdu_encode_cis_terminate_ind()
939 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_CIS_TERMINATE_IND; in llcp_pdu_encode_cis_terminate_ind()
941 p = &pdu->llctrl.cis_terminate_ind; in llcp_pdu_encode_cis_terminate_ind()
947 void llcp_pdu_decode_cis_terminate_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_cis_terminate_ind() argument
949 ctx->data.cis_term.cig_id = pdu->llctrl.cis_terminate_ind.cig_id; in llcp_pdu_decode_cis_terminate_ind()
950 ctx->data.cis_term.cis_id = pdu->llctrl.cis_terminate_ind.cis_id; in llcp_pdu_decode_cis_terminate_ind()
951 ctx->data.cis_term.error_code = pdu->llctrl.cis_terminate_ind.error_code; in llcp_pdu_decode_cis_terminate_ind()
959 void llcp_pdu_encode_clock_accuracy_req(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_clock_accuracy_req() argument
961 struct pdu_data_llctrl_clock_accuracy_req *p = &pdu->llctrl.clock_accuracy_req; in llcp_pdu_encode_clock_accuracy_req()
963 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_clock_accuracy_req()
964 pdu->len = PDU_DATA_LLCTRL_LEN(clock_accuracy_req); in llcp_pdu_encode_clock_accuracy_req()
965 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_CLOCK_ACCURACY_REQ; in llcp_pdu_encode_clock_accuracy_req()
970 void llcp_pdu_encode_clock_accuracy_rsp(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_clock_accuracy_rsp() argument
972 struct pdu_data_llctrl_clock_accuracy_rsp *p = &pdu->llctrl.clock_accuracy_rsp; in llcp_pdu_encode_clock_accuracy_rsp()
974 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_clock_accuracy_rsp()
975 pdu->len = PDU_DATA_LLCTRL_LEN(clock_accuracy_rsp); in llcp_pdu_encode_clock_accuracy_rsp()
976 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_CLOCK_ACCURACY_RSP; in llcp_pdu_encode_clock_accuracy_rsp()
981 void llcp_pdu_decode_clock_accuracy_req(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_clock_accuracy_req() argument
983 struct pdu_data_llctrl_clock_accuracy_req *p = &pdu->llctrl.clock_accuracy_req; in llcp_pdu_decode_clock_accuracy_req()
988 void llcp_pdu_decode_clock_accuracy_rsp(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_clock_accuracy_rsp() argument
990 struct pdu_data_llctrl_clock_accuracy_rsp *p = &pdu->llctrl.clock_accuracy_rsp; in llcp_pdu_decode_clock_accuracy_rsp()
1020 void llcp_pdu_encode_periodic_sync_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_encode_periodic_sync_ind() argument
1022 struct pdu_data_llctrl_periodic_sync_ind *p = &pdu->llctrl.periodic_sync_ind; in llcp_pdu_encode_periodic_sync_ind()
1024 pdu->ll_id = PDU_DATA_LLID_CTRL; in llcp_pdu_encode_periodic_sync_ind()
1025 pdu->len = PDU_DATA_LLCTRL_LEN(periodic_sync_ind); in llcp_pdu_encode_periodic_sync_ind()
1026 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_PERIODIC_SYNC_IND; in llcp_pdu_encode_periodic_sync_ind()
1048 void llcp_pdu_decode_periodic_sync_ind(struct proc_ctx *ctx, struct pdu_data *pdu) in llcp_pdu_decode_periodic_sync_ind() argument
1050 struct pdu_data_llctrl_periodic_sync_ind *p = &pdu->llctrl.periodic_sync_ind; in llcp_pdu_decode_periodic_sync_ind()