/* Helper function to release periodic advertising chain that was enqueued for advertising set.  */
void common_release_per_adv_chain(struct ll_adv_set *adv_set)
/* Helper function to release periodic advertising chain that was enqueued for advertising set.  */
void common_release_per_adv_chain(struct ll_adv_set *adv_set)
{
	struct lll_adv_sync *lll_sync;
	struct pdu_adv *pdu;
	lll_sync = adv_set->lll.sync;
	pdu = lll_adv_sync_data_peek(lll_sync, NULL);
	if (pdu != NULL) {
		lll_adv_pdu_linked_release_all(pdu);
	}
	pdu = (void *)lll_sync->data.pdu[lll_sync->data.first];
	if (pdu != NULL) {
		lll_adv_pdu_linked_release_all(pdu);
	}
}