From 88dba0dd3555204144325fe17d50e9ee49543a3d Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Fri, 14 Jul 2017 08:55:30 +0200 Subject: [PATCH] Bluetooth: controller: Fix cond. mayfly priority check When the controller is configured to have its worker and job be run at different interrupt priority, check for mayfly priority being equal was incorrect. Fixed by conditionally compiling the correct check of mayfly priority level. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/ll.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subsys/bluetooth/controller/ll_sw/ll.c b/subsys/bluetooth/controller/ll_sw/ll.c index 35df709bec7..c7a6ba8278b 100644 --- a/subsys/bluetooth/controller/ll_sw/ll.c +++ b/subsys/bluetooth/controller/ll_sw/ll.c @@ -106,11 +106,15 @@ u32_t mayfly_is_enabled(u8_t caller_id, u8_t callee_id) u32_t mayfly_prio_is_equal(u8_t caller_id, u8_t callee_id) { +#if (RADIO_TICKER_USER_ID_WORKER_PRIO == RADIO_TICKER_USER_ID_JOB_PRIO) return (caller_id == callee_id) || ((caller_id == MAYFLY_CALL_ID_0) && (callee_id == MAYFLY_CALL_ID_1)) || ((caller_id == MAYFLY_CALL_ID_1) && (callee_id == MAYFLY_CALL_ID_0)); +#else + return caller_id == callee_id; +#endif } void mayfly_pend(u8_t caller_id, u8_t callee_id)