Attention is currently required from: pespin, fixeria. Hello Jenkins Builder, pespin, fixeria,
I'd like you to do a code review. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/30642
to review the following change.
Change subject: Revert "shutdown_fsm: Only ramp down power when stopping bts through Ctrl-C" ......................................................................
Revert "shutdown_fsm: Only ramp down power when stopping bts through Ctrl-C"
This reverts commit c96d34f8281a307f9e4cf6fd00adc6eba377012c.
Reason for revert: This breaks ramping up power since the power ramp logic still assumes the output is full power.
Change-Id: I47a16a4b3ba02d74473569c0f4350a41fc12a464 --- M include/osmo-bts/bts.h M src/common/bts_shutdown_fsm.c M src/common/main.c M src/osmo-bts-trx/l1_if.c 4 files changed, 8 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/42/30642/1
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index bd66443..b1a594c 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -396,7 +396,7 @@
int bts_init(struct gsm_bts *bts); void bts_shutdown(struct gsm_bts *bts, const char *reason); -void bts_shutdown_ext(struct gsm_bts *bts, const char *reason, bool exit_proc, bool do_power_ramp); +void bts_shutdown_ext(struct gsm_bts *bts, const char *reason, bool exit_proc);
int bts_link_estab(struct gsm_bts *bts);
diff --git a/src/common/bts_shutdown_fsm.c b/src/common/bts_shutdown_fsm.c index f7a38d6..0c6d80c 100644 --- a/src/common/bts_shutdown_fsm.c +++ b/src/common/bts_shutdown_fsm.c @@ -56,7 +56,6 @@ static void st_none(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct gsm_bts *bts = (struct gsm_bts *)fi->priv; - bool do_power_ramping = *(bool *)data; unsigned int count; switch(event) { case BTS_SHUTDOWN_EV_START: @@ -64,10 +63,10 @@ osmo_fsm_inst_dispatch(bts->site_mgr.mo.fi, NM_EV_SHUTDOWN_START, NULL);
count = count_trx_operational(bts); - if (count && do_power_ramping) { + if (count) { bts_shutdown_fsm_state_chg(fi, BTS_SHUTDOWN_ST_WAIT_RAMP_DOWN_COMPL); } else { - /* we can skip ramp down if it was requested or no TRX is running anyway. + /* we can skip ramp down since no TRX is running anyway. * Let's jump into WAIT_TRX_CLOSED to make sure we * tell lower layer to close all TRX in case there's some * open() WIP */ @@ -251,7 +250,7 @@ return fi->state != BTS_SHUTDOWN_ST_NONE; }
-void bts_shutdown_ext(struct gsm_bts *bts, const char *reason, bool exit_proc, bool do_power_ramp) +void bts_shutdown_ext(struct gsm_bts *bts, const char *reason, bool exit_proc) { struct osmo_fsm_inst *fi = bts->shutdown_fi; if (bts_shutdown_in_progress(bts)) { @@ -263,12 +262,12 @@ bts->shutdown_fi_exit_proc = exit_proc; LOGPFSML(fi, LOGL_NOTICE, "Shutting down BTS, exit %u, reason: %s\n", exit_proc, reason); - osmo_fsm_inst_dispatch(fi, BTS_SHUTDOWN_EV_START, &do_power_ramp); + osmo_fsm_inst_dispatch(fi, BTS_SHUTDOWN_EV_START, NULL); }
void bts_shutdown(struct gsm_bts *bts, const char *reason) { - bts_shutdown_ext(bts, reason, true, false); + bts_shutdown_ext(bts, reason, true); }
void bts_model_trx_close_cb(struct gsm_bts_trx *trx, int rc) diff --git a/src/common/main.c b/src/common/main.c index ea6c61e..954cc34 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -233,7 +233,7 @@ oml_tx_failure_event_rep(&g_bts->mo, NM_SEVER_CRITICAL, OSMO_EVT_CRIT_PROC_STOP, "BTS: SIGINT received -> shutdown"); - bts_shutdown_ext(g_bts, "SIGINT", true, false); + bts_shutdown(g_bts, "SIGINT"); } quit++; break; diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index dc90bf9..8c364c3 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -195,7 +195,7 @@ { /* Go into shutdown state deactivating transceivers until Abis link * becomes up again */ - bts_shutdown_ext(bts, "Abis close", false, false); + bts_shutdown_ext(bts, "Abis close", false); }
int bts_model_adjst_ms_pwr(struct gsm_lchan *lchan)