aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/bsc/bts.h4
-rw-r--r--src/osmo-bsc/bsc_vty.c22
-rw-r--r--tests/osmo-bsc.vty37
3 files changed, 63 insertions, 0 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 2e88129dd..992c9bb22 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -450,6 +450,10 @@ struct gsm_bts {
* rather than starting from TRX0 and go upwards? */
int chan_alloc_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. */
+ bool chan_alloc_avoid_interf;
+
enum neigh_list_manual_mode neigh_list_manual_mode;
/* parameters from which we build SYSTEM INFORMATION */
struct {
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 07c8a9c9e..9c1813d9d 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -1073,6 +1073,8 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
vty_out(vty, " channel allocator %s%s",
bts->chan_alloc_reverse ? "descending" : "ascending",
VTY_NEWLINE);
+ if (bts->chan_alloc_avoid_interf)
+ vty_out(vty, " channel allocator avoid-interference 1%s", VTY_NEWLINE);
vty_out(vty, " rach tx integer %u%s",
bts->si_common.rach_control.tx_integer, VTY_NEWLINE);
vty_out(vty, " rach max transmission %u%s",
@@ -2839,6 +2841,25 @@ DEFUN_ATTR(cfg_bts_challoc,
return CMD_SUCCESS;
}
+DEFUN_ATTR(cfg_bts_chan_alloc_interf,
+ cfg_bts_chan_alloc_interf_cmd,
+ "channel allocator avoid-interference (0|1)",
+ "Channel Allocator\n" "Channel Allocator\n"
+ "Configure whether reported interference levels from RES IND are used in channel allocation\n"
+ "Ignore interference levels (default). Always assign lchans in a deterministic order.\n"
+ "In channel allocation, prefer lchans with less interference.\n",
+ CMD_ATTR_IMMEDIATE)
+{
+ struct gsm_bts *bts = vty->index;
+
+ if (!strcmp(argv[0], "0"))
+ bts->chan_alloc_avoid_interf = false;
+ else
+ bts->chan_alloc_avoid_interf = true;
+
+ return CMD_SUCCESS;
+}
+
#define RACH_STR "Random Access Control Channel\n"
DEFUN_USRATTR(cfg_bts_rach_tx_integer,
@@ -8081,6 +8102,7 @@ int bsc_vty_init(struct gsm_network *network)
install_element(BTS_NODE, &cfg_bts_oml_e1_cmd);
install_element(BTS_NODE, &cfg_bts_oml_e1_tei_cmd);
install_element(BTS_NODE, &cfg_bts_challoc_cmd);
+ install_element(BTS_NODE, &cfg_bts_chan_alloc_interf_cmd);
install_element(BTS_NODE, &cfg_bts_rach_tx_integer_cmd);
install_element(BTS_NODE, &cfg_bts_rach_max_trans_cmd);
install_element(BTS_NODE, &cfg_bts_rach_max_delay_cmd);
diff --git a/tests/osmo-bsc.vty b/tests/osmo-bsc.vty
index 22e2a0668..1d859c3f9 100644
--- a/tests/osmo-bsc.vty
+++ b/tests/osmo-bsc.vty
@@ -147,3 +147,40 @@ network
meas-feed destination 127.0.0.23 4223
meas-feed scenario foo23
...
+
+
+OsmoBSC(config-net)# bts 0
+
+OsmoBSC(config-net-bts)# list
+...
+ channel allocator avoid-interference (0|1)
+...
+
+OsmoBSC(config-net-bts)# channel?
+ channel Channel Allocator
+
+OsmoBSC(config-net-bts)# channel ?
+ allocator Channel Allocator
+
+OsmoBSC(config-net-bts)# channel allocator ?
+ ascending Allocate Timeslots and Transceivers in ascending order
+ descending Allocate Timeslots and Transceivers in descending order
+ avoid-interference Configure whether reported interference levels from RES IND are used in channel allocation
+
+OsmoBSC(config-net-bts)# channel allocator avoid-interference ?
+ 0 Ignore interference levels (default). Always assign lchans in a deterministic order.
+ 1 In channel allocation, prefer lchans with less interference.
+
+OsmoBSC(config-net-bts)# show running-config
+... !channel allocator avoid-interference
+OsmoBSC(config-net-bts)# channel allocator avoid-interference 1
+OsmoBSC(config-net-bts)# show running-config
+...
+ bts 0
+...
+ channel allocator avoid-interference 1
+...
+
+OsmoBSC(config-net-bts)# channel allocator avoid-interference 0
+OsmoBSC(config-net-bts)# show running-config
+... !channel allocator avoid-interference