aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-06-16 01:22:33 +0700
committerfixeria <vyanitskiy@sysmocom.de>2022-06-30 16:36:41 +0000
commitff9d3a64dc8fec465140c244a816db22eea97b6b (patch)
tree02c82c96b4f4de48a5e34f6d9f66410d3f10e343 /include
parent46fe68094415795a454ac049e7351cf779d03633 (diff)
lchan_select: prepare a list of timeslots once, iterate over it
The lchan_avail_by_type() attempts to find an unused lchan for the given GSM_LCHAN_* value: TCH/F, TCH/H, or SDCCH. This is achieved by looking up timeslots with compatible GSM_PCHAN_* values. For instance, finding an unused SDCCH lchan may involve: * attempt to find a timeslot with pchan=GSM_PCHAN_CCCH_SDCCH4, * attempt to find a timeslot with pchan=GSM_PCHAN_CCCH_SDCCH4_CBCH, * attempt to find a timeslot with pchan=GSM_PCHAN_SDCCH8_SACCH8C, * attempt to find a timeslot with pchan=GSM_PCHAN_SDCCH8_SACCH8C_CBCH, * attempt to find a timeslot with pchan=GSM_PCHAN_OSMO_DYN (switched), * attempt to find a timeslot with pchan=GSM_PCHAN_OSMO_DYN (not switched). Each attempt involves iterating over all timeslots of each TRX, either in ascending or in descending order (see _lc_dyn_find_bts() and _lc_find_trx()). This patch simplifies the lookup logic by preparing a monolithic array of timeslot pointers once, and then using that array for each GSM_PCHAN_* lookup attempt. This change is required for the upcoming dynamic channel allocation mode, which is fa more complex than the existing ascending/descending ones. A side effect of this change is that the interference aware mode of allocation is not limited by the scope of a single TRX anymore. Interference levels are now compared within the scope of the whole BTS, so that lchans on the other TRXes may be picked if they are better according to the interference reports from the BTS. Change-Id: I7ccc56856bfd40fd7c63b7437736de60c2b516ff Related: SYS#5460
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions