From 5a9b202a0d0ead9bc03adcd83addbe9bf72c2f81 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Fri, 28 Oct 2022 09:53:54 +0200 Subject: [PATCH] nimble/ll: Don't allow to enable DTM if controller is busy DTM disables whitening and should not be mixed with any normal BLE traffic. --- nimble/controller/src/ble_ll_dtm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nimble/controller/src/ble_ll_dtm.c b/nimble/controller/src/ble_ll_dtm.c index 2a32ccca2..352a380ae 100644 --- a/nimble/controller/src/ble_ll_dtm.c +++ b/nimble/controller/src/ble_ll_dtm.c @@ -483,7 +483,7 @@ ble_ll_dtm_tx_test(uint8_t tx_chan, uint8_t len, uint8_t packet_payload, { uint8_t phy_mode; - if (g_ble_ll_dtm_ctx.active) { + if (g_ble_ll_dtm_ctx.active || ble_ll_is_busy()) { return BLE_ERR_CTLR_BUSY; } @@ -585,7 +585,7 @@ ble_ll_dtm_rx_test(uint8_t rx_chan, uint8_t hci_phy) { uint8_t phy_mode; - if (g_ble_ll_dtm_ctx.active) { + if (g_ble_ll_dtm_ctx.active || ble_ll_is_busy()) { return BLE_ERR_CTLR_BUSY; }