Bluetooth: controller: llcp: initialise DLE parameters

The initialisation of DLE parameters for the peripheral
was done before the intialisation of the PHY settings.
Since the DLE parameters depend on PHY settings this
can result in incorrect parameters for tx/rx time and
octets
One scenario is where a previous connection set the PHY to
2M or CODED, then when a new connection is established
it uses the same memory-locations for connection settings as the
previous connection, and the (uninitialised) PHY settings will be
set to 2M or CODED, and thus the DLE parameters will be wrong
This PR moves the initialisation of DLE parameters after
that of PHY settings

EBQ tests effected include LL/CON/PER/BV-77-C.

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
This commit is contained in:
Andries Kruithof 2022-07-01 09:02:18 +02:00 committed by Carles Cufí
commit 6d7a04a0ba
2 changed files with 20 additions and 11 deletions

View file

@ -8189,6 +8189,11 @@ void ull_dle_init(struct ll_conn *conn, uint8_t phy)
conn->lll.dle.remote.max_rx_time = max_time_min;
#endif /* CONFIG_BT_CTLR_PHY */
/*
* ref. Bluetooth Core Specification version 5.3, Vol. 6,
* Part B, section 4.5.10 we can call ull_dle_update_eff
* for initialisation
*/
ull_dle_update_eff(conn);
/* Check whether the controller should perform a data length update after