Bluetooth: Controller: Skip re-init of static initialized PDU fields

Skip re-initialization of statically initialized PDU struct
fields that are not modified at runtime.

When supporting connection oriented CTE, the cp bit and
resv field used for CTE info are modified, hence
re-initialized these and accordingly reset the values
when just-in-time HCI Tx Data fragmentation is performed
in the Lower Link Layer.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2021-12-29 11:30:19 +05:30 committed by Anas Nashif
commit af5e6a1108
3 changed files with 24 additions and 12 deletions

View file

@ -2052,20 +2052,17 @@ uint16_t ull_conn_lll_max_tx_octets_get(struct lll_conn *lll)
/**
* @brief Initialize pdu_data members that are read only in lower link layer.
* Fields that are modified after static initialization are only
* re-initialized.
*
* @param pdu_tx Pointer to pdu_data object to be initialized
*/
void ull_pdu_data_init(struct pdu_data *pdu_tx)
{
LL_ASSERT(pdu_tx);
pdu_tx->cp = false;
pdu_tx->rfu = 0U;
#if !defined(CONFIG_SOC_OPENISA_RV32M1_RISCV32)
#if !defined(CONFIG_BT_CTLR_DATA_LENGTH_CLEAR)
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_TX)
pdu_tx->cp = 0U;
pdu_tx->resv = 0U;
#endif /* CONFIG_BT_CTLR_DATA_LENGTH_CLEAR */
#endif /* !CONFIG_SOC_OPENISA_RV32M1_RISCV32 */
#endif /* CONFIG_BT_CTLR_DF_CONN_CTE_TX */
}
static int init_reset(void)