diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-06-06 01:43:28 +0600 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-06-18 04:00:47 +0700 |
commit | 60190c8e1d54f752836caf85add973968101d6aa (patch) | |
tree | b5f0d63d9b8dfeb78dcf90a5f4bcc8145f9c79b5 /include/osmocom/bsc | |
parent | f1c416261bf75e44dd5de9b2dffcf1475189588a (diff) |
lchan_select: allow different alloc order for assignment and handover
Change-Id: I3ae73b36ee9433cc768376b56f0765e5f416162f
Related: SYS#5460
Diffstat (limited to 'include/osmocom/bsc')
-rw-r--r-- | include/osmocom/bsc/bts.h | 4 | ||||
-rw-r--r-- | include/osmocom/bsc/lchan_select.h | 21 |
2 files changed, 21 insertions, 4 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index 8abcf1323..76945a136 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -517,7 +517,9 @@ struct gsm_bts { /* should the channel allocator allocate channels from high TRX to TRX0, * rather than starting from TRX0 and go upwards? */ - int chan_alloc_reverse; + bool chan_alloc_chan_req_reverse; + bool chan_alloc_assignment_reverse; + bool chan_alloc_handover_reverse; /* When true, interference measurements from the BTS are used in the channel allocator to favor lchans with less * interference reported in RSL Resource Indication. */ diff --git a/include/osmocom/bsc/lchan_select.h b/include/osmocom/bsc/lchan_select.h index 3bb0d1ce6..b5eb078db 100644 --- a/include/osmocom/bsc/lchan_select.h +++ b/include/osmocom/bsc/lchan_select.h @@ -1,9 +1,24 @@ /* Select a suitable lchan from a given cell. */ #pragma once -struct gsm_lchan *lchan_select_by_type(struct gsm_bts *bts, enum gsm_chan_t type); +enum lchan_select_reason { + SELECT_FOR_MS_CHAN_REQ, + SELECT_FOR_ASSIGNMENT, + SELECT_FOR_HANDOVER, +}; + +extern const struct value_string lchan_select_reason_names[]; +static inline const char *lchan_select_reason_name(enum lchan_select_reason reason) +{ return get_value_string(lchan_select_reason_names, reason); } + +struct gsm_lchan *lchan_select_by_type(struct gsm_bts *bts, + enum gsm_chan_t type, + enum lchan_select_reason reason); 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); -struct gsm_lchan *lchan_avail_by_type(struct gsm_bts *bts, enum gsm_chan_t type, bool log); + 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); void lchan_select_set_type(struct gsm_lchan *lchan, enum gsm_chan_t type); |