From 47a3b780dbc5a6bf302cb3325e2e38617f8e8a8c Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 19 Feb 2021 16:56:36 +0100 Subject: [PATCH] find_multi_slots: Avoid calling mslot_class_get_tx() on each iteration Change-Id: I397495c158bce1c2715991371368b0d84cf69261 --- src/gprs_rlcmac_ts_alloc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 6b34418b..469ede38 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -556,7 +556,7 @@ int find_multi_slots(struct gprs_rlcmac_trx *trx, uint8_t mslot_class, uint8_t * /* Check for each UL (TX) slot */ /* Iterate through possible numbers of TX slots */ - for (num_tx = 1; num_tx <= mslot_class_get_tx(mslot_class); num_tx += 1) { + for (num_tx = 1; num_tx <= Tx; num_tx += 1) { uint16_t tx_valid_win = (1 << num_tx) - 1; uint8_t rx_mask[MASK_TR + 1];