From 0f5d5a4836696403f0a7b00ac89789045c847ddb Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 2 Feb 2024 18:05:20 +0100 Subject: rlcmac: tbf_ul: Fix wrong parenthesis around macro The logic doesn't seem to be affected by the fact that the parenthesis were wrong. Change-Id: I3f4aeff45c3fd5a007b050bd78283baaca2a18d7 --- src/rlcmac/tbf_ul.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rlcmac/tbf_ul.c b/src/rlcmac/tbf_ul.c index 26d710e..0ea0a9c 100644 --- a/src/rlcmac/tbf_ul.c +++ b/src/rlcmac/tbf_ul.c @@ -555,7 +555,7 @@ static void blk_count_append_llc(struct blk_count_state *st, unsigned int llc_pa /* Returned as early return from function when amount of RLC blocks goes clearly over BS_CV_MAX */ #define BLK_COUNT_TOOMANY 0xff /* We cannot early-check if extra_li0=true, since there may temporarily have too many rlc blocks: */ -#define BLK_COUNT_EARLY_CHECK_TOOMANY(st) (!(st)->extra_li0) && blk_count_to_x(st) > (st)->bs_cv_max) +#define BLK_COUNT_EARLY_CHECK_TOOMANY(st) (!((st)->extra_li0) && blk_count_to_x(st) > (st)->bs_cv_max) static uint8_t blk_count_append_llc_prio_queue(struct blk_count_state *st, const struct gprs_llc_prio_queue *pq) { struct msgb *msg; @@ -563,7 +563,7 @@ static uint8_t blk_count_append_llc_prio_queue(struct blk_count_state *st, const llist_for_each_entry(msg, &pq->queue, list) { blk_count_append_llc(st, msgb_l2len(msg)); /* We cannot early-check if extra_li0=true, since there may temporarily have too many rlc blocks. */ - if (BLK_COUNT_EARLY_CHECK_TOOMANY(st) + if (BLK_COUNT_EARLY_CHECK_TOOMANY(st)) return BLK_COUNT_TOOMANY; /* early return, not entering countdown procedure */ } return 0; @@ -592,7 +592,7 @@ static uint8_t gprs_rlcmac_ul_tbf_calculate_cv(const struct gprs_rlcmac_ul_tbf * /* First of all, the current LLC frame in progress: */ if (ul_tbf->llc_tx_msg) { blk_count_append_llc(&st, msgb_length(ul_tbf->llc_tx_msg)); - if (BLK_COUNT_EARLY_CHECK_TOOMANY(&st) + if (BLK_COUNT_EARLY_CHECK_TOOMANY(&st)) goto done; /* early return, not entering countdown procedure */ } -- cgit v1.2.3