aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-10-18 18:39:22 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-10-18 18:45:37 +0200
commit3b02b9ad53aacd83688a8b9e0b3edbaf38b6a4c2 (patch)
tree4035058bb532d6c48f76f6fda0f0cece864789fc /include
parent3cd4745efe3efe5620d82f5d67dcd141cabe9549 (diff)
bts_shutdown_fsm: Make sure pending power ramping are aborted before closing TRX
It can happen when using several TRX that all of them go alreadyunder shutdown target tx power level, but that due to configuration the BTS still may want to keep pushing the tx power level even lower. Hence, we end up in a situation where the FSM is trying to close all the TRX while the power ramp procedure is ongoing for some of them. As a result, race conditions can happen where for instance the power ramping procedure for one TRX ends and calls the cb to send SETPOWER after the TRX PHY has been closed (and hence TRXC link is unavaialble). If that happens, the trx_if lower layers store the SETPOWER and attempt a later retransmit, which may take up to 2 seconds after TRX becomes active if BTS reconnects immediatelly. Hence, we end up in some test cases where BTS reconnects and configures some TRX while others are kep unconfigured for a while due to the mentioned delay, hence the test attempting to use the TS while it hasn't been yet configured. The solution is to avoid this kind of unexpected events with ongoing powe ramp once we have decided tx power is lower enough to shutdown the TRX completely. Hence we abort the pending power ramp procedure. Change-Id: Ibca581131eb142d7c38c917a0d6990efec03123c
Diffstat (limited to 'include')
-rw-r--r--include/osmo-bts/tx_power.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmo-bts/tx_power.h b/include/osmo-bts/tx_power.h
index 8f68d8a5..a7f846e8 100644
--- a/include/osmo-bts/tx_power.h
+++ b/include/osmo-bts/tx_power.h
@@ -78,6 +78,7 @@ int get_p_trxout_actual_mdBm(const struct gsm_bts_trx *trx, uint8_t bs_power_red
int get_p_trxout_actual_mdBm_lchan(const struct gsm_lchan *lchan);
int power_ramp_start(struct gsm_bts_trx *trx, int p_total_tgt_mdBm, int bypass, ramp_compl_cb_t ramp_compl_cb);
+void power_ramp_abort(struct gsm_bts_trx *trx);
void power_trx_change_compl(struct gsm_bts_trx *trx, int p_trxout_cur_mdBm);