aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/bts_shutdown_fsm.c
diff options
context:
space:
mode:
authordaniel <dwillmann@sysmocom.de>2022-12-17 13:21:17 +0000
committerdaniel <dwillmann@sysmocom.de>2022-12-17 13:21:17 +0000
commit300b72b44c584c9fd47f3f19d6bace7b90ffb2a1 (patch)
treef79eee44c61bd72bf67dbf470e87e837702ed7b1 /src/common/bts_shutdown_fsm.c
parentc96d34f8281a307f9e4cf6fd00adc6eba377012c (diff)
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
Diffstat (limited to 'src/common/bts_shutdown_fsm.c')
-rw-r--r--src/common/bts_shutdown_fsm.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/common/bts_shutdown_fsm.c b/src/common/bts_shutdown_fsm.c
index f7a38d60..0c6d80c1 100644
--- a/src/common/bts_shutdown_fsm.c
+++ b/src/common/bts_shutdown_fsm.c
@@ -56,7 +56,6 @@ static unsigned int count_trx_operational(struct gsm_bts *bts) {
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 @@ static void st_none(struct osmo_fsm_inst *fi, uint32_t event, void *data)
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 @@ bool bts_shutdown_in_progress(const struct gsm_bts *bts)
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 @@ void bts_shutdown_ext(struct gsm_bts *bts, const char *reason, bool exit_proc, b
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)