From 41e6016885ca55fc4aa0bf57dc811a904e52565f Mon Sep 17 00:00:00 2001 From: Wolfgang Puffitsch Date: Wed, 20 Nov 2019 20:29:31 +0100 Subject: [PATCH] Bluetooth: controller: split: 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/ull_conn.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subsys/bluetooth/controller/ll_sw/ull_conn.c b/subsys/bluetooth/controller/ll_sw/ull_conn.c index 3b3d09cddd8..2a84d27ed7c 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_conn.c +++ b/subsys/bluetooth/controller/ll_sw/ull_conn.c @@ -3182,7 +3182,11 @@ static inline void event_len_prep(struct ll_conn *conn) #endif /* !CONFIG_BT_CTLR_PHY */ ) { u16_t rx_time = PKT_US(LL_LENGTH_OCTETS_RX_MAX, 0); +#if defined(CONFIG_BT_CTLR_PHY) + u16_t tx_time = conn->default_tx_time; +#else /* !CONFIG_BT_CTLR_PHY */ u16_t tx_time = PKT_US(conn->default_tx_octets, 0); +#endif /* !CONFIG_BT_CTLR_PHY */ lr->max_rx_time = sys_cpu_to_le16(rx_time); lr->max_tx_time = sys_cpu_to_le16(tx_time);