From f5bbb4d3fdd3dfaf34442b868fc73e1ee4f25fc7 Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Thu, 2 Jan 2020 14:40:02 +0530 Subject: [PATCH] Bluetooth: controller: legacy: Fix tx_time calculation for length update Fix tx_time calculation for the case that BT_CTRL_PHY is defined and there has not been a feature exchange. Signed-off-by: Wolfgang Puffitsch Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/ctrl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subsys/bluetooth/controller/ll_sw/ctrl.c b/subsys/bluetooth/controller/ll_sw/ctrl.c index 66fd5755e71..316218c3ad2 100644 --- a/subsys/bluetooth/controller/ll_sw/ctrl.c +++ b/subsys/bluetooth/controller/ll_sw/ctrl.c @@ -8405,8 +8405,13 @@ static inline int event_len_prep(struct connection *conn) ) { lr->max_rx_time = RADIO_PKT_TIME(LL_LENGTH_OCTETS_RX_MAX, 0); +#if defined(CONFIG_BT_CTLR_PHY) + lr->max_tx_time = conn->default_tx_time; +#else /* !CONFIG_BT_CTLR_PHY */ lr->max_tx_time = RADIO_PKT_TIME(conn->default_tx_octets, 0); +#endif /* !CONFIG_BT_CTLR_PHY */ + #if defined(CONFIG_BT_CTLR_PHY) #if defined(CONFIG_BT_CTLR_PHY_CODED) } else if (conn->llcp_feature.features &