From 060ac37166312617ee4e3d90d2228683063e6c29 Mon Sep 17 00:00:00 2001 From: Thomas Ebert Hansen Date: Tue, 22 Mar 2022 10:02:01 +0100 Subject: [PATCH] Bluetooth: controller: Fix RX data pause Reset pause_rx_data to 0 during adv enable or connection creation. Signed-off-by: Thomas Ebert Hansen --- subsys/bluetooth/controller/ll_sw/ull_adv.c | 4 ++++ subsys/bluetooth/controller/ll_sw/ull_central.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/subsys/bluetooth/controller/ll_sw/ull_adv.c b/subsys/bluetooth/controller/ll_sw/ull_adv.c index 86d88cc93ff..f91a08de823 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_adv.c +++ b/subsys/bluetooth/controller/ll_sw/ull_adv.c @@ -1125,6 +1125,10 @@ uint8_t ll_adv_enable(uint8_t enable) conn->phy_pref_rx = ull_conn_default_phy_rx_get(); #endif /* CONFIG_BT_CTLR_PHY */ +#if defined(CONFIG_BT_CTLR_LE_ENC) + conn->pause_rx_data = 0U; +#endif /* CONFIG_BT_CTLR_LE_ENC */ + /* Re-initialize the Tx Q */ ull_tx_q_init(&conn->tx_q); #endif /* CONFIG_BT_LL_SW_LLCP_LEGACY */ diff --git a/subsys/bluetooth/controller/ll_sw/ull_central.c b/subsys/bluetooth/controller/ll_sw/ull_central.c index 1f98a6e6d57..eb054b87315 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_central.c +++ b/subsys/bluetooth/controller/ll_sw/ull_central.c @@ -374,6 +374,10 @@ uint8_t ll_create_connection(uint16_t scan_interval, uint16_t scan_window, conn->phy_pref_rx = ull_conn_default_phy_rx_get(); #endif /* CONFIG_BT_CTLR_PHY */ +#if defined(CONFIG_BT_CTLR_LE_ENC) + conn->pause_rx_data = 0U; +#endif /* CONFIG_BT_CTLR_LE_ENC */ + /* Re-initialize the Tx Q */ ull_tx_q_init(&conn->tx_q); #endif /* CONFIG_BT_LL_SW_LLCP_LEGACY */