aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/bsc/bts.h
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-06-16 01:22:33 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-06-18 04:00:47 +0700
commitf1c416261bf75e44dd5de9b2dffcf1475189588a (patch)
treef919abea46e88fd4e31ba4e0b5d9f1cb2be45cae /include/osmocom/bsc/bts.h
parent5070516fb80b63a10a0eedabc753ab8d7a5fafff (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 also facilitates adding more complex (than ascending/descending) allocation algorithms. Change-Id: I7ccc56856bfd40fd7c63b7437736de60c2b516ff Related: SYS#5460
Diffstat (limited to 'include/osmocom/bsc/bts.h')
0 files changed, 0 insertions, 0 deletions