diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2022-12-19 15:07:27 +0100 |
---|---|---|
committer | daniel <dwillmann@sysmocom.de> | 2022-12-21 23:51:51 +0000 |
commit | 63baf960c621aa3bd30f5a7acff4b04401821a4e (patch) | |
tree | 0cd8a70be27b1dedba6ffebd6a85f303036ee1bc /src/common/bts_shutdown_fsm.c | |
parent | 73773447715c57075ad5acb96a5346ff23d7e91f (diff) |
shutdown_fsm: Add power_ramp_force() to jump straight to the tgt power
Both power_ramp_start() and power_ramp_force() are now small macros
around _power_ramp_start()
The new behavior is:
* ramp down power when stopping bts through Ctrl-C
* the other shutdown causes skip power ramping
This will cause the bts to reconnect faster when the oml link is
dropped and power ramping is enabled.
Change-Id: Ida1d7bbf094958b9142af306dbf84206729a609e
Related: SYS#6237
Diffstat (limited to 'src/common/bts_shutdown_fsm.c')
-rw-r--r-- | src/common/bts_shutdown_fsm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/common/bts_shutdown_fsm.c b/src/common/bts_shutdown_fsm.c index 0c6d80c1..55e0b190 100644 --- a/src/common/bts_shutdown_fsm.c +++ b/src/common/bts_shutdown_fsm.c @@ -89,7 +89,10 @@ static void st_wait_ramp_down_compl_on_enter(struct osmo_fsm_inst *fi, uint32_t llist_for_each_entry(trx, &bts->trx_list, list) { if (trx->mo.nm_state.operational != NM_OPSTATE_ENABLED) continue; - power_ramp_start(trx, to_mdB(BTS_SHUTDOWN_POWER_RAMP_TGT), 1, ramp_down_compl_cb); + if (bts->shutdown_fi_skip_power_ramp) + power_ramp_force(trx, to_mdB(BTS_SHUTDOWN_POWER_RAMP_TGT), 1, ramp_down_compl_cb); + else + power_ramp_start(trx, to_mdB(BTS_SHUTDOWN_POWER_RAMP_TGT), 1, ramp_down_compl_cb); } } @@ -250,7 +253,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) +void bts_shutdown_ext(struct gsm_bts *bts, const char *reason, bool exit_proc, bool skip_power_ramp) { struct osmo_fsm_inst *fi = bts->shutdown_fi; if (bts_shutdown_in_progress(bts)) { @@ -260,6 +263,7 @@ void bts_shutdown_ext(struct gsm_bts *bts, const char *reason, bool exit_proc) return; } bts->shutdown_fi_exit_proc = exit_proc; + bts->shutdown_fi_skip_power_ramp = skip_power_ramp; LOGPFSML(fi, LOGL_NOTICE, "Shutting down BTS, exit %u, reason: %s\n", exit_proc, reason); osmo_fsm_inst_dispatch(fi, BTS_SHUTDOWN_EV_START, NULL); @@ -267,7 +271,7 @@ void bts_shutdown_ext(struct gsm_bts *bts, const char *reason, bool exit_proc) void bts_shutdown(struct gsm_bts *bts, const char *reason) { - bts_shutdown_ext(bts, reason, true); + bts_shutdown_ext(bts, reason, true, true); } void bts_model_trx_close_cb(struct gsm_bts_trx *trx, int rc) |