aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_rlcmac_ts_alloc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gprs_rlcmac_ts_alloc.cpp')
-rw-r--r--src/gprs_rlcmac_ts_alloc.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp
index d4cd9841..ffbbe2b8 100644
--- a/src/gprs_rlcmac_ts_alloc.cpp
+++ b/src/gprs_rlcmac_ts_alloc.cpp
@@ -481,8 +481,6 @@ static int find_multi_slots(struct gprs_rlcmac_bts *bts,
enum {MASK_TT, MASK_TR};
unsigned mask_sel;
- uint32_t checked_tx[256/32] = {0};
-
if (ms->ms_class() >= 32) {
LOGP(DRLCMAC, LOGL_ERROR, "Multislot class %d out of range.\n",
ms->ms_class());
@@ -593,11 +591,12 @@ static int find_multi_slots(struct gprs_rlcmac_bts *bts,
/* Filter out unavailable slots */
tx_window &= *ul_slots;
- /* Avoid repeated TX combination check */
- if (test_and_set_bit(checked_tx, tx_window))
+ /* Skip if the the first TS (ul_ts) is not in the set */
+ if ((tx_window & (1 << ul_ts)) == 0)
continue;
- if (!tx_window)
+ /* Skip if the the last TS (ul_ts+num_tx-1) is not in the set */
+ if ((tx_window & (1 << ((ul_ts+num_tx-1) % 8))) == 0)
continue;
tx_slot_count = bitcount(tx_window);