aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith <keith@rhizomatica.org>2021-09-21 00:09:59 +0200
committerKeith <keith@rhizomatica.org>2021-09-23 06:35:16 +0200
commitca3332f90601da8321c05a04bcc3415a3726b298 (patch)
tree1f12f848b30f77c65b94df67fa06219e6c732121
parentaa4d99fd8b11f922a2bc9828b427affa8e25560c (diff)
Add vty command to manually force MS Uplink Power
-rw-r--r--src/osmo-bsc/bsc_vty.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 5ccd78487..8977a08a1 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -1884,6 +1884,32 @@ DEFUN_HIDDEN(lchan_act_all_trx, lchan_act_all_trx_cmd,
return CMD_SUCCESS;
}
+DEFUN(lchan_set_mspower, lchan_set_mspower_cmd,
+ "bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> ms-power <5-40>\n",
+ BTS_NR_TRX_TS_SS_STR2
+ "Manually force MS Uplink Power Level in dBm on the lchan (for testing)\n")
+{
+ struct gsm_bts_trx_ts *ts;
+ struct gsm_lchan *lchan;
+ int ss_nr = atoi(argv[3]);
+ ts = vty_get_ts(vty, argv[0], argv[1], argv[2]);
+ if (!ts)
+ return CMD_WARNING;
+
+ if (ss_nr >= ts->max_primary_lchans) {
+ vty_out(vty, "%% Invalid sub-slot number for this timeslot type%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ lchan = &ts->lchan[ss_nr];
+ if (!lchan->fi)
+ return CMD_WARNING;
+
+ lchan->ms_power = ms_pwr_ctl_lvl(ts->trx->bts->band, atoi(argv[4]));
+ rsl_chan_ms_power_ctrl(lchan);
+ return CMD_SUCCESS;
+}
+
DEFUN(vamos_modify_lchan, vamos_modify_lchan_cmd,
"bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> modify (vamos|non-vamos) " TSC_ARGS_OPT,
BTS_NR_TRX_TS_SS_STR2
@@ -3402,6 +3428,7 @@ int bsc_vty_init(struct gsm_network *network)
install_element(ENABLE_NODE, &lchan_mdcx_cmd);
install_element(ENABLE_NODE, &lchan_set_borken_cmd);
install_element(ENABLE_NODE, &lchan_reassign_cmd);
+ install_element(ENABLE_NODE, &lchan_set_mspower_cmd);
install_element(ENABLE_NODE, &handover_subscr_conn_cmd);
install_element(ENABLE_NODE, &assignment_subscr_conn_cmd);