Lines Matching refs:pdu

50 static void common_pdu_adv_data_set(struct pdu_adv *pdu, const uint8_t *data, uint8_t len);
143 struct pdu_adv *pdu_prev, *pdu, *pdu_new; in common_create_per_adv_chain() local
151 pdu = lll_adv_sync_data_peek(lll_sync, NULL); in common_create_per_adv_chain()
152 ull_adv_sync_pdu_init(pdu, 0U, 0U, 0U, NULL); in common_create_per_adv_chain()
155 &pdu, &extra_data_prev, &extra_data, &pdu_idx); in common_create_per_adv_chain()
168 ull_adv_sync_pdu_init(pdu, (pdu_count > 1 ? ULL_ADV_PDU_HDR_FIELD_AUX_PTR | in common_create_per_adv_chain()
175 ull_adv_sync_pdu_init(pdu, (pdu_count > 1 ? ULL_ADV_PDU_HDR_FIELD_AUX_PTR : in common_create_per_adv_chain()
185 common_pdu_adv_data_set(pdu, pdu_buff, strlen(pdu_buff)); in common_create_per_adv_chain()
223 lll_adv_pdu_linked_append(pdu_new, pdu); in common_create_per_adv_chain()
224 pdu = pdu_new; in common_create_per_adv_chain()
239 struct pdu_adv *pdu; in common_release_per_adv_chain() local
242 pdu = lll_adv_sync_data_peek(lll_sync, NULL); in common_release_per_adv_chain()
243 if (pdu != NULL) { in common_release_per_adv_chain()
244 lll_adv_pdu_linked_release_all(pdu); in common_release_per_adv_chain()
247 pdu = (void *)lll_sync->data.pdu[lll_sync->data.first]; in common_release_per_adv_chain()
248 if (pdu != NULL) { in common_release_per_adv_chain()
249 lll_adv_pdu_linked_release_all(pdu); in common_release_per_adv_chain()
268 void common_validate_per_adv_pdu(struct pdu_adv *pdu, enum test_pdu_ext_adv_type type, in common_validate_per_adv_pdu() argument
276 if (pdu->len > 1) { in common_validate_per_adv_pdu()
277 com_hdr = &pdu->adv_ext_ind; in common_validate_per_adv_pdu()
345 zassert_true((pdu->len - ext_hdr_len) > 0, in common_validate_per_adv_pdu()
348 zassert_equal(pdu->len - ext_hdr_len, 0, in common_validate_per_adv_pdu()
389 struct pdu_adv *pdu; in common_validate_per_adv_chain() local
391 pdu = lll_adv_sync_data_peek(adv->lll.sync, NULL); in common_validate_per_adv_chain()
400 common_validate_per_adv_pdu(pdu, TEST_PDU_EXT_ADV_SYNC_IND, ext_hdr_flags); in common_validate_per_adv_chain()
401 pdu = lll_adv_pdu_linked_next_get(pdu); in common_validate_per_adv_chain()
403 zassert_not_null(pdu, "Expected PDU in periodic advertising chain is NULL"); in common_validate_per_adv_chain()
405 zassert_is_null(pdu, "Unexpected PDU in a single PDU periodic advertising chain"); in common_validate_per_adv_chain()
418 common_validate_per_adv_pdu(pdu, TEST_PDU_EXT_ADV_CHAIN_IND, ext_hdr_flags); in common_validate_per_adv_chain()
419 pdu = lll_adv_pdu_linked_next_get(pdu); in common_validate_per_adv_chain()
421 zassert_not_null(pdu, "Expected PDU in periodic advertising chain is NULL"); in common_validate_per_adv_chain()
423 zassert_is_null(pdu, "Unexpected PDU at end of periodic advertising chain"); in common_validate_per_adv_chain()
444 struct pdu_adv *pdu; in common_validate_chain_with_cte() local
447 pdu = lll_adv_sync_data_peek(adv->lll.sync, NULL); in common_validate_chain_with_cte()
458 common_validate_per_adv_pdu(pdu, TEST_PDU_EXT_ADV_SYNC_IND, ext_hdr_flags); in common_validate_chain_with_cte()
462 pdu = lll_adv_pdu_linked_next_get(pdu); in common_validate_chain_with_cte()
464 zassert_not_null(pdu, "Expected PDU in periodic advertising chain is NULL"); in common_validate_chain_with_cte()
466 zassert_is_null(pdu, "Unexpected PDU in a single PDU periodic advertising chain"); in common_validate_chain_with_cte()
482 common_validate_per_adv_pdu(pdu, TEST_PDU_EXT_ADV_CHAIN_IND, ext_hdr_flags); in common_validate_chain_with_cte()
484 pdu = lll_adv_pdu_linked_next_get(pdu); in common_validate_chain_with_cte()
486 zassert_not_null(pdu, "Expected PDU in periodic advertising chain is NULL"); in common_validate_chain_with_cte()
488 zassert_is_null(pdu, "Unexpected PDU at end of periodic advertising chain"); in common_validate_chain_with_cte()
511 static void common_pdu_adv_data_set(struct pdu_adv *pdu, const uint8_t *data, uint8_t len) in common_pdu_adv_data_set() argument
517 com_hdr = &pdu->adv_ext_ind; in common_pdu_adv_data_set()
521 len_max = PDU_AC_PAYLOAD_SIZE_MAX - (dptr - pdu->payload); in common_pdu_adv_data_set()
529 pdu->len = dptr - pdu->payload; in common_pdu_adv_data_set()