aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-06-16 02:10:16 +0700
committerfixeria <vyanitskiy@sysmocom.de>2022-06-30 16:36:55 +0000
commita019e9af8bdb8dd01e801f7686cfaf99a21241b9 (patch)
treee8578f7b37eeceee78dd27acee0921381d5ef1d8 /include
parentc2928ac269a55d2ea1a6ae7984ba9065f8c41db0 (diff)
lchan_select: implement dynamic selection mode for assignment
This change implements an additional channel allocation mode, which can be employed during a TCH channel allocation for assignment. Selection between ascending and descending order is performed depending on pre-configured parameters: * Uplink RxLev threshold and number of samples for averaging, * C0 (BCCH carrier) channel load threshold. This is useful in setups where Tx power of the RF carriers cannot be adjusted +dynamically at run-time and thus BS Power Control cannot be performed. In such setups the BCCH carrier is transmitting at relatively higher power than the other RF carriers. The key idea is to allocate channels in a smarter way, so that UEs with poor signal would get channels on carriers with high Tx power, while UEs with good signal could use carriers with lower Tx power. Change-Id: I1b7a0d706976b73cc5c30a8714b830811addfe8d Related: osmo-ttcn3-hacks.git Ia522f37c1c001b3a36f5145b8875fbb88311c2e5 Related: SYS#5460
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/bsc/bts.h10
-rw-r--r--include/osmocom/bsc/lchan_select.h12
2 files changed, 18 insertions, 4 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 76945a136..752a00a73 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -521,6 +521,16 @@ struct gsm_bts {
bool chan_alloc_assignment_reverse;
bool chan_alloc_handover_reverse;
+ /* Whether to use dynamic allocation mode for assignment */
+ bool chan_alloc_assignment_dynamic;
+ /* Parameters used for dynamic mode of allocation */
+ struct {
+ bool sort_by_trx_power;
+ uint8_t ul_rxlev_thresh;
+ uint8_t ul_rxlev_avg_num;
+ uint8_t c0_chan_load_thresh;
+ } chan_alloc_dyn_params;
+
/* When true, interference measurements from the BTS are used in the channel allocator to favor lchans with less
* interference reported in RSL Resource Indication. */
bool chan_alloc_avoid_interf;
diff --git a/include/osmocom/bsc/lchan_select.h b/include/osmocom/bsc/lchan_select.h
index b5eb078db..8f1dc628a 100644
--- a/include/osmocom/bsc/lchan_select.h
+++ b/include/osmocom/bsc/lchan_select.h
@@ -13,12 +13,16 @@ static inline const char *lchan_select_reason_name(enum lchan_select_reason reas
struct gsm_lchan *lchan_select_by_type(struct gsm_bts *bts,
enum gsm_chan_t type,
- enum lchan_select_reason reason);
+ enum lchan_select_reason reason,
+ void *ctx);
enum gsm_chan_t chan_mode_to_chan_type(enum gsm48_chan_mode chan_mode, enum channel_rate chan_rate);
struct gsm_lchan *lchan_select_by_chan_mode(struct gsm_bts *bts,
enum gsm48_chan_mode chan_mode,
enum channel_rate chan_rate,
- enum lchan_select_reason reason);
-struct gsm_lchan *lchan_avail_by_type(struct gsm_bts *bts, enum gsm_chan_t type,
- enum lchan_select_reason reason, bool log);
+ enum lchan_select_reason reason,
+ void *ctx);
+struct gsm_lchan *lchan_avail_by_type(struct gsm_bts *bts,
+ enum gsm_chan_t type,
+ enum lchan_select_reason reason,
+ void *ctx, bool log);
void lchan_select_set_type(struct gsm_lchan *lchan, enum gsm_chan_t type);