From e72d86397b585f5e7adf7104f275a080fb02628c Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Tue, 16 Nov 2021 13:08:26 +0530 Subject: [PATCH] Bluetooth: Controller: Use define for invalid advertising handle Use define for invalid advertising handle. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/lll.h | 3 +++ subsys/bluetooth/controller/ll_sw/ull_adv_iso.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/controller/ll_sw/lll.h b/subsys/bluetooth/controller/ll_sw/lll.h index b141ae08300..656968658a6 100644 --- a/subsys/bluetooth/controller/ll_sw/lll.h +++ b/subsys/bluetooth/controller/ll_sw/lll.h @@ -334,6 +334,9 @@ struct node_rx_iso_meta { /* Define invalid/unassigned Controller LLL context handle */ #define LLL_HANDLE_INVALID 0xFFFF +/* Define invalid/unassigned Controller Advertising LLL context handle */ +#define LLL_ADV_HANDLE_INVALID 0xFF + /* Header of node_rx_pdu */ struct node_rx_hdr { union { diff --git a/subsys/bluetooth/controller/ll_sw/ull_adv_iso.c b/subsys/bluetooth/controller/ll_sw/ull_adv_iso.c index 20bb7693b8a..2c809af9334 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_adv_iso.c +++ b/subsys/bluetooth/controller/ll_sw/ull_adv_iso.c @@ -609,7 +609,7 @@ void ull_adv_iso_done_terminate(struct node_rx_event_done *done) lll = &adv_iso->lll; /* Skip if terminated already (we come here if pipeline being flushed */ - if (unlikely(lll->handle == 0xFF)) { + if (unlikely(lll->handle == LLL_ADV_HANDLE_INVALID)) { return; } @@ -620,7 +620,7 @@ void ull_adv_iso_done_terminate(struct node_rx_event_done *done) (ret == TICKER_STATUS_BUSY)); /* Invalidate the handle */ - lll->handle = 0xFF; + lll->handle = LLL_ADV_HANDLE_INVALID; } static int init_reset(void)