From bee6aa325b4e3e11616d98af463dc581136e20dd Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Tue, 23 Feb 2021 13:41:06 +0530 Subject: [PATCH] Bluetooth: controller: Increased thread context operation queue count When ticker job is disabled inside radio events then all advertising, scanning, and slave latency cancel ticker operations will be deferred, requiring increased ticker thread context operation queue count. Relates to #32430. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/ull.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/subsys/bluetooth/controller/ll_sw/ull.c b/subsys/bluetooth/controller/ll_sw/ull.c index 21ae94ea840..d41ac2d1fbc 100644 --- a/subsys/bluetooth/controller/ll_sw/ull.c +++ b/subsys/bluetooth/controller/ll_sw/ull.c @@ -98,13 +98,20 @@ #if defined(CONFIG_BT_CTLR_LOW_LAT) && \ (CONFIG_BT_CTLR_LLL_PRIO == CONFIG_BT_CTLR_ULL_LOW_PRIO) #define TICKER_USER_LLL_OPS (3 + TICKER_USER_LLL_VENDOR_OPS + 1) -#else +/* NOTE: When ticker job is disabled inside radio events then all advertising, + * scanning, and slave latency cancel ticker operations will be deferred, + * requiring increased ticker thread context operation queue count. + */ +#define TICKER_USER_THREAD_OPS (BT_CTLR_ADV_SET + BT_CTLR_SCAN_SET + \ + BT_CTLR_CONN_MAX + \ + TICKER_USER_THREAD_VENDOR_OPS + 1) +#else /* !CONFIG_BT_CTLR_LOW_LAT */ #define TICKER_USER_LLL_OPS (2 + TICKER_USER_LLL_VENDOR_OPS + 1) -#endif /* CONFIG_BT_CTLR_LOW_LAT */ +#define TICKER_USER_THREAD_OPS (1 + TICKER_USER_THREAD_VENDOR_OPS + 1) +#endif /* !CONFIG_BT_CTLR_LOW_LAT */ #define TICKER_USER_ULL_HIGH_OPS (3 + TICKER_USER_ULL_HIGH_VENDOR_OPS + 1) #define TICKER_USER_ULL_LOW_OPS (1 + 1) -#define TICKER_USER_THREAD_OPS (1 + TICKER_USER_THREAD_VENDOR_OPS + 1) #if defined(CONFIG_BT_BROADCASTER) #define BT_ADV_TICKER_NODES ((TICKER_ID_ADV_LAST) - (TICKER_ID_ADV_STOP) + 1)