From 3db3ae5aed44d8ec45501117f41f9904ef073aa5 Mon Sep 17 00:00:00 2001 From: Andries Kruithof Date: Tue, 14 Jan 2020 18:28:07 +0100 Subject: [PATCH] Bluetooth: controller: split: Fix DLE preparation routine This fixes the EBQ tests 129 and 130. These tests check behaviour for the DLE procedure when Encoded PHY or 2M PHY are not supported. See also BT core spec. Version 5.1, Vol6, Part B, Section 5.1.9 Signed-off-by: Andries Kruithof --- subsys/bluetooth/controller/ll_sw/ull_conn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subsys/bluetooth/controller/ll_sw/ull_conn.c b/subsys/bluetooth/controller/ll_sw/ull_conn.c index 63653594d1f..537ef58e003 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_conn.c +++ b/subsys/bluetooth/controller/ll_sw/ull_conn.c @@ -3194,7 +3194,8 @@ static inline void event_len_prep(struct ll_conn *conn) (!feature_coded_phy && !feature_phy_2m)) { rx_time = PKT_US(LL_LENGTH_OCTETS_RX_MAX, 0); #if defined(CONFIG_BT_CTLR_PHY) - tx_time = conn->default_tx_time; + tx_time = MIN(PKT_US(LL_LENGTH_OCTETS_RX_MAX, 0), + conn->default_tx_time); #else /* !CONFIG_BT_CTLR_PHY */ tx_time = PKT_US(conn->default_tx_octets, 0); #endif /* !CONFIG_BT_CTLR_PHY */