diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-11-09 17:22:58 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-11-10 11:36:55 +0100 |
commit | 978071bce976afa95f2063e97caa2611ee40e08d (patch) | |
tree | dfa0e4d3ad3b4f0f88d3c2581b3915f5cdfd90cb | |
parent | d9066272ecb2f7cb6adea1def1d6c3b95a8118c6 (diff) |
ts_alloc: rename function to clraify what it does
The function updates nothing, so it's misleading. It simply counts
slots, so let's call it like that.
Change-Id: I55954321d6f2b5e755177a8829512da371e934aa
-rw-r--r-- | src/gprs_rlcmac_ts_alloc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index b69d7357..13e64401 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -661,7 +661,7 @@ int find_multi_slots(struct gprs_rlcmac_trx *trx, uint8_t mslot_class, uint8_t * * \param[out] slotcount Number of TS in use * \param[out] avail_count Number of reserved TS */ -static void update_slot_counters(uint8_t slots, uint8_t reserved_slots, uint8_t *slotcount, uint8_t *avail_count) +static void count_slots(uint8_t slots, uint8_t reserved_slots, uint8_t *slotcount, uint8_t *avail_count) { (*slotcount) = pcu_bitcount(slots); (*avail_count) = pcu_bitcount(reserved_slots); @@ -910,7 +910,7 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, struct gprs_rlcmac_tbf *tbf, /* Step 3b: Derive the slot set for a given direction */ if (tbf->direction == GPRS_RLCMAC_DL_TBF) { dl_slots = rc; - update_slot_counters(dl_slots, reserved_dl_slots, &slotcount, &avail_count); + count_slots(dl_slots, reserved_dl_slots, &slotcount, &avail_count); } else { rc = allocate_usf(trx, rc, dl_slots, usf); if (rc < 0) @@ -919,7 +919,7 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, struct gprs_rlcmac_tbf *tbf, ul_slots = rc; reserved_ul_slots = ul_slots; - update_slot_counters(ul_slots, reserved_ul_slots, &slotcount, &avail_count); + count_slots(ul_slots, reserved_ul_slots, &slotcount, &avail_count); } first_ts = ffs(rc) - 1; |