Lines Matching refs:p
103 struct pdu_data_llctrl_unknown_rsp *p; in llcp_ntf_encode_unknown_rsp() local
108 p = &pdu->llctrl.unknown_rsp; in llcp_ntf_encode_unknown_rsp()
109 p->type = ctx->unknown_response.type; in llcp_ntf_encode_unknown_rsp()
134 struct pdu_data_llctrl_feature_req *p; in llcp_pdu_encode_feature_req() local
146 p = &pdu->llctrl.feature_req; in llcp_pdu_encode_feature_req()
147 sys_put_le64(ll_feat_get(), p->features); in llcp_pdu_encode_feature_req()
152 struct pdu_data_llctrl_feature_rsp *p; in llcp_pdu_encode_feature_rsp() local
159 p = &pdu->llctrl.feature_rsp; in llcp_pdu_encode_feature_rsp()
167 sys_put_le64(feature_rsp, p->features); in llcp_pdu_encode_feature_rsp()
172 struct pdu_data_llctrl_feature_rsp *p; in llcp_ntf_encode_feature_rsp() local
177 p = &pdu->llctrl.feature_rsp; in llcp_ntf_encode_feature_rsp()
179 sys_put_le64(conn->llcp.fex.features_peer, p->features); in llcp_ntf_encode_feature_rsp()
226 struct pdu_data_llctrl_min_used_chans_ind *p; in llcp_pdu_encode_min_used_chans_ind() local
231 p = &pdu->llctrl.min_used_chans_ind; in llcp_pdu_encode_min_used_chans_ind()
232 p->phys = ctx->data.muc.phys; in llcp_pdu_encode_min_used_chans_ind()
233 p->min_used_chans = ctx->data.muc.min_used_chans; in llcp_pdu_encode_min_used_chans_ind()
251 struct pdu_data_llctrl_terminate_ind *p; in llcp_pdu_encode_terminate_ind() local
256 p = &pdu->llctrl.terminate_ind; in llcp_pdu_encode_terminate_ind()
257 p->error_code = ctx->data.term.error_code; in llcp_pdu_encode_terminate_ind()
272 struct pdu_data_llctrl_version_ind *p; in llcp_pdu_encode_version_ind() local
278 p = &pdu->llctrl.version_ind; in llcp_pdu_encode_version_ind()
279 p->version_number = LL_VERSION_NUMBER; in llcp_pdu_encode_version_ind()
282 p->company_id = cid; in llcp_pdu_encode_version_ind()
283 p->sub_version_number = svn; in llcp_pdu_encode_version_ind()
288 struct pdu_data_llctrl_version_ind *p; in llcp_ntf_encode_version_ind() local
294 p = &pdu->llctrl.version_ind; in llcp_ntf_encode_version_ind()
295 p->version_number = conn->llcp.vex.cached.version_number; in llcp_ntf_encode_version_ind()
296 p->company_id = sys_cpu_to_le16(conn->llcp.vex.cached.company_id); in llcp_ntf_encode_version_ind()
297 p->sub_version_number = sys_cpu_to_le16(conn->llcp.vex.cached.sub_version_number); in llcp_ntf_encode_version_ind()
326 struct pdu_data_llctrl_enc_req *p; in encode_enc_req() local
332 p = &pdu->llctrl.enc_req; in encode_enc_req()
333 memcpy(p->rand, ctx->data.enc.rand, sizeof(p->rand)); in encode_enc_req()
334 p->ediv[0] = ctx->data.enc.ediv[0]; in encode_enc_req()
335 p->ediv[1] = ctx->data.enc.ediv[1]; in encode_enc_req()
342 struct pdu_data_llctrl_enc_req *p; in llcp_pdu_encode_enc_req() local
347 p = &pdu->llctrl.enc_req; in llcp_pdu_encode_enc_req()
349 offsetof(struct pdu_data_llctrl_enc_req, skdm) + sizeof(p->skdm), in llcp_pdu_encode_enc_req()
351 csrand_get(p->skdm, sizeof(p->skdm) + sizeof(p->ivm)); in llcp_pdu_encode_enc_req()
364 struct pdu_data_llctrl_enc_rsp *p; in llcp_pdu_encode_enc_rsp() local
370 p = &pdu->llctrl.enc_rsp; in llcp_pdu_encode_enc_rsp()
373 offsetof(struct pdu_data_llctrl_enc_rsp, skds) + sizeof(p->skds), in llcp_pdu_encode_enc_rsp()
375 csrand_get(p->skds, sizeof(p->skds) + sizeof(p->ivs)); in llcp_pdu_encode_enc_rsp()
435 struct pdu_data_llctrl_reject_ext_ind *p; in llcp_ntf_encode_reject_ext_ind() local
441 p = (void *)&pdu->llctrl.reject_ext_ind; in llcp_ntf_encode_reject_ext_ind()
442 p->error_code = ctx->reject_ext_ind.error_code; in llcp_ntf_encode_reject_ext_ind()
443 p->reject_opcode = ctx->reject_ext_ind.reject_opcode; in llcp_ntf_encode_reject_ext_ind()
506 struct pdu_data_llctrl_conn_param_req_rsp_common *p, in encode_conn_param_req_rsp_common() argument
514 p->interval_min = sys_cpu_to_le16(ctx->data.cu.interval_min); in encode_conn_param_req_rsp_common()
515 p->interval_max = sys_cpu_to_le16(ctx->data.cu.interval_max); in encode_conn_param_req_rsp_common()
516 p->latency = sys_cpu_to_le16(ctx->data.cu.latency); in encode_conn_param_req_rsp_common()
517 p->timeout = sys_cpu_to_le16(ctx->data.cu.timeout); in encode_conn_param_req_rsp_common()
518 p->preferred_periodicity = ctx->data.cu.preferred_periodicity; in encode_conn_param_req_rsp_common()
519 p->reference_conn_event_count = sys_cpu_to_le16(ctx->data.cu.reference_conn_event_count); in encode_conn_param_req_rsp_common()
520 p->offset0 = sys_cpu_to_le16(ctx->data.cu.offsets[0]); in encode_conn_param_req_rsp_common()
521 p->offset1 = sys_cpu_to_le16(ctx->data.cu.offsets[1]); in encode_conn_param_req_rsp_common()
522 p->offset2 = sys_cpu_to_le16(ctx->data.cu.offsets[2]); in encode_conn_param_req_rsp_common()
523 p->offset3 = sys_cpu_to_le16(ctx->data.cu.offsets[3]); in encode_conn_param_req_rsp_common()
524 p->offset4 = sys_cpu_to_le16(ctx->data.cu.offsets[4]); in encode_conn_param_req_rsp_common()
525 p->offset5 = sys_cpu_to_le16(ctx->data.cu.offsets[5]); in encode_conn_param_req_rsp_common()
544 struct pdu_data_llctrl_conn_param_req_rsp_common *p) in decode_conn_param_req_rsp_common() argument
546 ctx->data.cu.interval_min = sys_le16_to_cpu(p->interval_min); in decode_conn_param_req_rsp_common()
547 ctx->data.cu.interval_max = sys_le16_to_cpu(p->interval_max); in decode_conn_param_req_rsp_common()
548 ctx->data.cu.latency = sys_le16_to_cpu(p->latency); in decode_conn_param_req_rsp_common()
549 ctx->data.cu.timeout = sys_le16_to_cpu(p->timeout); in decode_conn_param_req_rsp_common()
550 ctx->data.cu.preferred_periodicity = p->preferred_periodicity; in decode_conn_param_req_rsp_common()
551 ctx->data.cu.reference_conn_event_count = sys_le16_to_cpu(p->reference_conn_event_count); in decode_conn_param_req_rsp_common()
552 ctx->data.cu.offsets[0] = sys_le16_to_cpu(p->offset0); in decode_conn_param_req_rsp_common()
553 ctx->data.cu.offsets[1] = sys_le16_to_cpu(p->offset1); in decode_conn_param_req_rsp_common()
554 ctx->data.cu.offsets[2] = sys_le16_to_cpu(p->offset2); in decode_conn_param_req_rsp_common()
555 ctx->data.cu.offsets[3] = sys_le16_to_cpu(p->offset3); in decode_conn_param_req_rsp_common()
556 ctx->data.cu.offsets[4] = sys_le16_to_cpu(p->offset4); in decode_conn_param_req_rsp_common()
557 ctx->data.cu.offsets[5] = sys_le16_to_cpu(p->offset5); in decode_conn_param_req_rsp_common()
575 struct pdu_data_llctrl_conn_update_ind *p; in llcp_pdu_encode_conn_update_ind() local
581 p = (void *)&pdu->llctrl.conn_update_ind; in llcp_pdu_encode_conn_update_ind()
582 p->win_size = ctx->data.cu.win_size; in llcp_pdu_encode_conn_update_ind()
583 p->win_offset = sys_cpu_to_le16(ctx->data.cu.win_offset_us / CONN_INT_UNIT_US); in llcp_pdu_encode_conn_update_ind()
584 p->latency = sys_cpu_to_le16(ctx->data.cu.latency); in llcp_pdu_encode_conn_update_ind()
585 p->interval = sys_cpu_to_le16(ctx->data.cu.interval_max); in llcp_pdu_encode_conn_update_ind()
586 p->timeout = sys_cpu_to_le16(ctx->data.cu.timeout); in llcp_pdu_encode_conn_update_ind()
587 p->instant = sys_cpu_to_le16(ctx->data.cu.instant); in llcp_pdu_encode_conn_update_ind()
592 struct pdu_data_llctrl_conn_update_ind *p; in llcp_pdu_decode_conn_update_ind() local
594 p = (void *)&pdu->llctrl.conn_update_ind; in llcp_pdu_decode_conn_update_ind()
595 ctx->data.cu.win_size = p->win_size; in llcp_pdu_decode_conn_update_ind()
596 ctx->data.cu.win_offset_us = sys_le16_to_cpu(p->win_offset) * CONN_INT_UNIT_US; in llcp_pdu_decode_conn_update_ind()
597 ctx->data.cu.latency = sys_le16_to_cpu(p->latency); in llcp_pdu_decode_conn_update_ind()
598 ctx->data.cu.interval_max = sys_le16_to_cpu(p->interval); in llcp_pdu_decode_conn_update_ind()
599 ctx->data.cu.timeout = sys_le16_to_cpu(p->timeout); in llcp_pdu_decode_conn_update_ind()
600 ctx->data.cu.instant = sys_le16_to_cpu(p->instant); in llcp_pdu_decode_conn_update_ind()
608 struct pdu_data_llctrl_chan_map_ind *p; in llcp_pdu_encode_chan_map_update_ind() local
613 p = &pdu->llctrl.chan_map_ind; in llcp_pdu_encode_chan_map_update_ind()
614 p->instant = sys_cpu_to_le16(ctx->data.chmu.instant); in llcp_pdu_encode_chan_map_update_ind()
615 memcpy(p->chm, ctx->data.chmu.chm, sizeof(p->chm)); in llcp_pdu_encode_chan_map_update_ind()
629 struct pdu_data_llctrl_length_req_rsp_common *p, in encode_length_req_rsp_common() argument
637 p->max_rx_octets = sys_cpu_to_le16(dle->max_rx_octets); in encode_length_req_rsp_common()
638 p->max_tx_octets = sys_cpu_to_le16(dle->max_tx_octets); in encode_length_req_rsp_common()
639 p->max_rx_time = sys_cpu_to_le16(dle->max_rx_time); in encode_length_req_rsp_common()
640 p->max_tx_time = sys_cpu_to_le16(dle->max_tx_time); in encode_length_req_rsp_common()
704 struct pdu_data_llctrl_length_req_rsp_common *p) in decode_length_req_rsp_common() argument
708 remote.max_rx_octets = sys_le16_to_cpu(p->max_rx_octets); in decode_length_req_rsp_common()
709 remote.max_tx_octets = sys_le16_to_cpu(p->max_tx_octets); in decode_length_req_rsp_common()
710 remote.max_rx_time = sys_le16_to_cpu(p->max_rx_time); in decode_length_req_rsp_common()
711 remote.max_tx_time = sys_le16_to_cpu(p->max_tx_time); in decode_length_req_rsp_common()
739 struct pdu_data_llctrl_cte_req *p; in llcp_pdu_encode_cte_req() local
745 p = &pdu->llctrl.cte_req; in llcp_pdu_encode_cte_req()
746 p->min_cte_len_req = ctx->data.cte_req.min_len; in llcp_pdu_encode_cte_req()
747 p->rfu = 0; /* Reserved for future use */ in llcp_pdu_encode_cte_req()
748 p->cte_type_req = ctx->data.cte_req.type; in llcp_pdu_encode_cte_req()
834 struct pdu_data_llctrl_cis_rsp *p; in llcp_pdu_encode_cis_rsp() local
840 p = &pdu->llctrl.cis_rsp; in llcp_pdu_encode_cis_rsp()
841 sys_put_le24(ctx->data.cis_create.cis_offset_max, p->cis_offset_max); in llcp_pdu_encode_cis_rsp()
842 sys_put_le24(ctx->data.cis_create.cis_offset_min, p->cis_offset_min); in llcp_pdu_encode_cis_rsp()
843 p->conn_event_count = sys_cpu_to_le16(ctx->data.cis_create.conn_event_count); in llcp_pdu_encode_cis_rsp()
850 struct pdu_data_llctrl_cis_req *p; in llcp_pdu_encode_cis_req() local
857 p = &pdu->llctrl.cis_req; in llcp_pdu_encode_cis_req()
859 p->cig_id = ctx->data.cis_create.cig_id; in llcp_pdu_encode_cis_req()
860 p->cis_id = ctx->data.cis_create.cis_id; in llcp_pdu_encode_cis_req()
861 p->c_phy = ctx->data.cis_create.c_phy; in llcp_pdu_encode_cis_req()
862 p->p_phy = ctx->data.cis_create.p_phy; in llcp_pdu_encode_cis_req()
863 p->nse = ctx->data.cis_create.nse; in llcp_pdu_encode_cis_req()
864 p->c_bn = ctx->data.cis_create.c_bn; in llcp_pdu_encode_cis_req()
865 p->p_bn = ctx->data.cis_create.p_bn; in llcp_pdu_encode_cis_req()
866 p->c_ft = ctx->data.cis_create.c_ft; in llcp_pdu_encode_cis_req()
867 p->p_ft = ctx->data.cis_create.p_ft; in llcp_pdu_encode_cis_req()
869 sys_put_le24(ctx->data.cis_create.c_sdu_interval, p->c_sdu_interval); in llcp_pdu_encode_cis_req()
870 sys_put_le24(ctx->data.cis_create.p_sdu_interval, p->p_sdu_interval); in llcp_pdu_encode_cis_req()
871 sys_put_le24(ctx->data.cis_create.cis_offset_max, p->cis_offset_max); in llcp_pdu_encode_cis_req()
872 sys_put_le24(ctx->data.cis_create.cis_offset_min, p->cis_offset_min); in llcp_pdu_encode_cis_req()
873 sys_put_le24(ctx->data.cis_create.sub_interval, p->sub_interval); in llcp_pdu_encode_cis_req()
875 p->c_max_pdu = sys_cpu_to_le16(ctx->data.cis_create.c_max_pdu); in llcp_pdu_encode_cis_req()
876 p->p_max_pdu = sys_cpu_to_le16(ctx->data.cis_create.p_max_pdu); in llcp_pdu_encode_cis_req()
877 p->iso_interval = sys_cpu_to_le16(ctx->data.cis_create.iso_interval); in llcp_pdu_encode_cis_req()
878 p->conn_event_count = sys_cpu_to_le16(ctx->data.cis_create.conn_event_count); in llcp_pdu_encode_cis_req()
880 p->c_max_sdu_packed[0] = ctx->data.cis_create.c_max_sdu & 0xFF; in llcp_pdu_encode_cis_req()
881 p->c_max_sdu_packed[1] = ((ctx->data.cis_create.c_max_sdu >> 8) & 0x0F) | in llcp_pdu_encode_cis_req()
883 p->p_max_sdu[0] = ctx->data.cis_create.p_max_sdu & 0xFF; in llcp_pdu_encode_cis_req()
884 p->p_max_sdu[1] = (ctx->data.cis_create.p_max_sdu >> 8) & 0x0F; in llcp_pdu_encode_cis_req()
910 struct pdu_data_llctrl_cis_ind *p; in llcp_pdu_encode_cis_ind() local
917 p = &pdu->llctrl.cis_ind; in llcp_pdu_encode_cis_ind()
919 p->aa[0] = ctx->data.cis_create.aa[0]; in llcp_pdu_encode_cis_ind()
920 p->aa[1] = ctx->data.cis_create.aa[1]; in llcp_pdu_encode_cis_ind()
921 p->aa[2] = ctx->data.cis_create.aa[2]; in llcp_pdu_encode_cis_ind()
922 p->aa[3] = ctx->data.cis_create.aa[3]; in llcp_pdu_encode_cis_ind()
924 sys_put_le24(ctx->data.cis_create.cis_offset_min, p->cis_offset); in llcp_pdu_encode_cis_ind()
925 sys_put_le24(ctx->data.cis_create.cig_sync_delay, p->cig_sync_delay); in llcp_pdu_encode_cis_ind()
926 sys_put_le24(ctx->data.cis_create.cis_sync_delay, p->cis_sync_delay); in llcp_pdu_encode_cis_ind()
928 p->conn_event_count = sys_cpu_to_le16(ctx->data.cis_create.conn_event_count); in llcp_pdu_encode_cis_ind()
935 struct pdu_data_llctrl_cis_terminate_ind *p; in llcp_pdu_encode_cis_terminate_ind() local
941 p = &pdu->llctrl.cis_terminate_ind; in llcp_pdu_encode_cis_terminate_ind()
942 p->cig_id = ctx->data.cis_term.cig_id; in llcp_pdu_encode_cis_terminate_ind()
943 p->cis_id = ctx->data.cis_term.cis_id; in llcp_pdu_encode_cis_terminate_ind()
944 p->error_code = ctx->data.cis_term.error_code; in llcp_pdu_encode_cis_terminate_ind()
961 struct pdu_data_llctrl_clock_accuracy_req *p = &pdu->llctrl.clock_accuracy_req; in llcp_pdu_encode_clock_accuracy_req() local
967 p->sca = lll_clock_sca_local_get(); in llcp_pdu_encode_clock_accuracy_req()
972 struct pdu_data_llctrl_clock_accuracy_rsp *p = &pdu->llctrl.clock_accuracy_rsp; in llcp_pdu_encode_clock_accuracy_rsp() local
978 p->sca = lll_clock_sca_local_get(); in llcp_pdu_encode_clock_accuracy_rsp()
983 struct pdu_data_llctrl_clock_accuracy_req *p = &pdu->llctrl.clock_accuracy_req; in llcp_pdu_decode_clock_accuracy_req() local
985 ctx->data.sca_update.sca = p->sca; in llcp_pdu_decode_clock_accuracy_req()
990 struct pdu_data_llctrl_clock_accuracy_rsp *p = &pdu->llctrl.clock_accuracy_rsp; in llcp_pdu_decode_clock_accuracy_rsp() local
992 ctx->data.sca_update.sca = p->sca; in llcp_pdu_decode_clock_accuracy_rsp()
1022 struct pdu_data_llctrl_periodic_sync_ind *p = &pdu->llctrl.periodic_sync_ind; in llcp_pdu_encode_periodic_sync_ind() local
1028 p->id = sys_cpu_to_le16(ctx->data.periodic_sync.id); in llcp_pdu_encode_periodic_sync_ind()
1030 memcpy(&p->sync_info, &ctx->data.periodic_sync.sync_info, sizeof(struct pdu_adv_sync_info)); in llcp_pdu_encode_periodic_sync_ind()
1032 p->sync_info.evt_cntr = sys_cpu_to_le16(ctx->data.periodic_sync.sync_info.evt_cntr); in llcp_pdu_encode_periodic_sync_ind()
1034 p->conn_event_count = sys_cpu_to_le16(ctx->data.periodic_sync.conn_event_count); in llcp_pdu_encode_periodic_sync_ind()
1035 p->last_pa_event_counter = sys_cpu_to_le16(ctx->data.periodic_sync.last_pa_event_counter); in llcp_pdu_encode_periodic_sync_ind()
1036 p->sid = ctx->data.periodic_sync.sid; in llcp_pdu_encode_periodic_sync_ind()
1037 p->addr_type = ctx->data.periodic_sync.addr_type; in llcp_pdu_encode_periodic_sync_ind()
1038 p->sca = ctx->data.periodic_sync.sca; in llcp_pdu_encode_periodic_sync_ind()
1039 p->phy = ctx->data.periodic_sync.phy; in llcp_pdu_encode_periodic_sync_ind()
1041 memcpy(&p->adv_addr, &ctx->data.periodic_sync.adv_addr, sizeof(bt_addr_t)); in llcp_pdu_encode_periodic_sync_ind()
1043 p->sync_conn_event_count = sys_cpu_to_le16(ctx->data.periodic_sync.sync_conn_event_count); in llcp_pdu_encode_periodic_sync_ind()
1050 struct pdu_data_llctrl_periodic_sync_ind *p = &pdu->llctrl.periodic_sync_ind; in llcp_pdu_decode_periodic_sync_ind() local
1052 ctx->data.periodic_sync.id = sys_le16_to_cpu(p->id); in llcp_pdu_decode_periodic_sync_ind()
1054 memcpy(&ctx->data.periodic_sync.sync_info, &p->sync_info, sizeof(struct pdu_adv_sync_info)); in llcp_pdu_decode_periodic_sync_ind()
1056 ctx->data.periodic_sync.conn_event_count = sys_le16_to_cpu(p->conn_event_count); in llcp_pdu_decode_periodic_sync_ind()
1057 ctx->data.periodic_sync.last_pa_event_counter = sys_le16_to_cpu(p->last_pa_event_counter); in llcp_pdu_decode_periodic_sync_ind()
1058 ctx->data.periodic_sync.sid = p->sid; in llcp_pdu_decode_periodic_sync_ind()
1059 ctx->data.periodic_sync.addr_type = p->addr_type; in llcp_pdu_decode_periodic_sync_ind()
1060 ctx->data.periodic_sync.sca = p->sca; in llcp_pdu_decode_periodic_sync_ind()
1061 ctx->data.periodic_sync.phy = p->phy; in llcp_pdu_decode_periodic_sync_ind()
1063 memcpy(&ctx->data.periodic_sync.adv_addr, &p->adv_addr, sizeof(bt_addr_t)); in llcp_pdu_decode_periodic_sync_ind()
1065 ctx->data.periodic_sync.sync_conn_event_count = sys_le16_to_cpu(p->sync_conn_event_count); in llcp_pdu_decode_periodic_sync_ind()