diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2021-01-27 23:45:33 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2021-02-05 20:24:43 +0100 |
commit | b03e73f27b26449864296fdab84f6fb6e1978c45 (patch) | |
tree | 4142fa45f1ccccd8e9bb040def380fab1e758ec5 /src/osmo-bsc/lchan_fsm.c | |
parent | 980a28fdcbf37b180159d02dd494e89e302b3481 (diff) |
lchan activation: indicate whether TA is known
On lchan activation, we already know the Timing Advance in most
situations: from the Channel Request RACH, or from a previous lchan in
the same cell. Place this information in lchan->activate.info.ta.
So far, the lchan->last_ta (until recently called rqd_ta) was used to
store the initial TA for channel activation -- move the initial TA to
lchan->activate.info.ta, for proper scoping.
Only an inter-cell handover does not yet know a Timing Advance (until
the Handover Detection RACH is received), so indicate
activate.info.ta_known = false for that case.
If ta_known is false, do not include an Access Delay IE in the Channel
Activation message, ensuring that the BTS does not use an arbitrary TA
that is likely inaccurate.
The effect for OsmoBTS is that we will *not* start the downlink SACCH on
channel activation for inter-cell handover, but will wait for a HO RACH
first, and then use the correct TA when enabling downlink SACCH.
Related: OS#4008 SYS#5192
Change-Id: I986bf93e8acd6aef7eaf63ac962480b680aa894f
Diffstat (limited to 'src/osmo-bsc/lchan_fsm.c')
-rw-r--r-- | src/osmo-bsc/lchan_fsm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 7a75c0b96..9c7ecaf48 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -580,7 +580,6 @@ static void lchan_fsm_wait_ts_ready_onenter(struct osmo_fsm_inst *fi, uint32_t p ms_power_dbm = ms_pwr_dbm(bts->band, old_lchan->ms_power); lchan_update_ms_power_ctrl_level(lchan, ms_power_dbm >= 0 ? ms_power_dbm : bts->ms_max_power); lchan->bs_power = old_lchan->bs_power; - lchan->last_ta = old_lchan->last_ta; } else { lchan_update_ms_power_ctrl_level(lchan, bts->ms_max_power); /* Upon last entering the UNUSED state, from lchan_reset(): @@ -702,8 +701,13 @@ static void lchan_fsm_wait_activ_ack_onenter(struct osmo_fsm_inst *fi, uint32_t lchan->encr = lchan->activate.info.encr; rc = rsl_tx_chan_activ(lchan, act_type, ho_ref); - if (rc) + if (rc) { lchan_fail_to(LCHAN_ST_UNUSED, "Tx Chan Activ failed: %s (%d)", strerror(-rc), rc); + return; + } + + if (lchan->activate.info.ta_known) + lchan->last_ta = lchan->activate.info.ta; } static void lchan_fsm_post_activ_ack(struct osmo_fsm_inst *fi); |