aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith <keith@rhizomatica.org>2022-10-06 11:17:51 -0500
committerkeith <keith@rhizomatica.org>2022-10-13 14:34:15 +0000
commit77fd0a589cec2804ee761351f1fec90b4d811793 (patch)
treec8d41f9fe67375a9649b5068db356b21b8f544f2
parentea35b26b35db8728fd56a31b565eaa232dd4834d (diff)
osmo-bts-trx: respond to tx-attenuation config in real time.
Some osmo-bts varieties have a method to make an immediate change to TX power from the vty. In osmo-bts-trx there does not seem to be any way, so lets start the power ramp loop when the parameter osmotrx tx-attenution is changed on a running TRX. Change-Id: I1fa5e8130202fb509593db4132863b762b0f40b7
-rw-r--r--src/osmo-bts-trx/trx_vty.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c
index 70e9b361..9cc98052 100644
--- a/src/osmo-bts-trx/trx_vty.c
+++ b/src/osmo-bts-trx/trx_vty.c
@@ -394,12 +394,13 @@ DEFUN_USRATTR(cfg_phyinst_rxgain, cfg_phyinst_rxgain_cmd,
return CMD_SUCCESS;
}
-DEFUN(cfg_phyinst_tx_atten, cfg_phyinst_tx_atten_cmd,
- "osmotrx tx-attenuation (oml|<0-50>)",
- OSMOTRX_STR
- "Set the transmitter attenuation\n"
- "Use NM_ATT_RF_MAXPOWR_R (max power reduction) from BSC via OML (default)\n"
- "Fixed attenuation in dB, overriding OML (default)\n")
+DEFUN_ATTR(cfg_phyinst_tx_atten, cfg_phyinst_tx_atten_cmd,
+ "osmotrx tx-attenuation (oml|<0-50>)",
+ OSMOTRX_STR
+ "Set the transmitter attenuation\n"
+ "Use NM_ATT_RF_MAXPOWR_R (max power reduction) from BSC via OML (default)\n"
+ "Fixed attenuation in dB, overriding OML (default)\n",
+ CMD_ATTR_IMMEDIATE)
{
struct phy_instance *pinst = vty->index;
struct trx_l1h *l1h = pinst->u.osmotrx.hdl;
@@ -409,6 +410,9 @@ DEFUN(cfg_phyinst_tx_atten, cfg_phyinst_tx_atten_cmd,
else
l1h->config.forced_max_power_red = atoi(argv[0]);
+ if (pinst->trx && pinst->trx->mo.nm_state.operational == NM_OPSTATE_ENABLED)
+ l1if_trx_start_power_ramp(pinst->trx, NULL);
+
return CMD_SUCCESS;
}