diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-09-20 17:59:21 +0200 |
---|---|---|
committer | pespin <pespin@sysmocom.de> | 2021-09-23 12:07:29 +0000 |
commit | dfedf2cb76cb47b729ebf22cce6e5b4d549b946c (patch) | |
tree | e25c804841a11a935bc9d321af20e66cb58cfbd7 /src/osmo-bts-trx/trx_provision_fsm.c | |
parent | 192390c797bd82823636027df61c308dc4d1dcc0 (diff) |
phy_link: Introduce bts_model_phy_link_close() and use it in bts-trx
This step is required while turning off the BTS without killing the
process. Right now only osmo-bts-trx supports this feature, so this
function is only available and used by osmo-bts-trx.
Later on, when the feature is support more generally, we can move call
to this function to common place like bts_shutdown_fsm or alike.
Change-Id: I3253112700a31b85db82dc7ccadec8542bac745e
Diffstat (limited to 'src/osmo-bts-trx/trx_provision_fsm.c')
-rw-r--r-- | src/osmo-bts-trx/trx_provision_fsm.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/osmo-bts-trx/trx_provision_fsm.c b/src/osmo-bts-trx/trx_provision_fsm.c index 60410734..7f42b47e 100644 --- a/src/osmo-bts-trx/trx_provision_fsm.c +++ b/src/osmo-bts-trx/trx_provision_fsm.c @@ -592,14 +592,13 @@ static void st_open_wait_poweroff_cnf(struct osmo_fsm_inst *fi, uint32_t event, case TRX_PROV_EV_POWEROFF_CNF: rc = (uint16_t)(intptr_t)data; if (plink->state != PHY_LINK_SHUTDOWN) { - trx_sched_clock_stopped(pinst->trx->bts); - phy_link_state_set(plink, PHY_LINK_SHUTDOWN); + bts_model_phy_link_close(plink); /* Notify TRX close on all TRX associated with this phy */ llist_for_each_entry(pinst, &plink->instances, list) { bts_model_trx_close_cb(pinst->trx, rc); } - trx_prov_fsm_state_chg(fi, TRX_PROV_ST_OPEN_POWEROFF); + trx_prov_fsm_state_chg(fi, TRX_PROV_ST_CLOSED); } break; default: @@ -661,7 +660,7 @@ static struct osmo_fsm_state trx_prov_fsm_states[] = { .in_event_mask = X(TRX_PROV_EV_POWEROFF_CNF), .out_state_mask = - X(TRX_PROV_ST_OPEN_POWEROFF), + X(TRX_PROV_ST_CLOSED), .name = "OPEN_WAIT_POWEROFF_CNF", .action = st_open_wait_poweroff_cnf, }, |