diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2020-11-04 13:31:41 +0000 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-11-26 09:22:38 +0000 |
commit | f733cf826375a3f348b6195b286af872beef0ff7 (patch) | |
tree | edc148cdc37db95decef7f7236705dfcca180e9e | |
parent | da680071a62c903333b93913fb56907a338f98fa (diff) |
part 1 of: fix SAPIs for handover to match 48.058 4.1.{3,4}
This part adds the common lchan flags to indicate whether DL SACCH
should be activated.
Note that currently, osmo-bsc *always* sends the MS Power IE as well as
the TA IE, also for inter-cell HO, so in the osmoverse, nothing will
change until we also adjust osmo-bsc. See OS#4858.
Change-Id: Ibea973ccadf5d424213f141f97a61395856b76de
-rw-r--r-- | include/osmo-bts/gsm_data.h | 16 | ||||
-rw-r--r-- | src/common/handover.c | 1 | ||||
-rw-r--r-- | src/common/rsl.c | 14 |
3 files changed, 31 insertions, 0 deletions
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h index 1c1c5d44..7670508a 100644 --- a/include/osmo-bts/gsm_data.h +++ b/include/osmo-bts/gsm_data.h @@ -194,6 +194,22 @@ struct gsm_lchan { char *name; + /* For handover, activation is described in 3GPP TS 48.058 4.1.3 and 4.1.4: + * + * | | Access || transmit | activate + * | MS Power | Delay || on main channel | dl SACCH + * ---------------------------------------------------------------------- + * async ho no * --> yes no + * async ho yes * --> yes may be started + * sync ho no no --> yes no + * sync ho yes no --> yes may be started + * sync ho yes yes --> yes shall be started + * + * Always start the main channel immediately. + * want_dl_sacch_active indicates whether dl SACCH should be activated on CHAN ACT. + */ + bool want_dl_sacch_active; + /* Number of different GsmL1_Sapi_t used in osmo_bts_sysmo is 23. * Currently we don't share these headers so this is a magic number. */ struct llist_head sapi_cmds; diff --git a/src/common/handover.c b/src/common/handover.c index b6159328..888649db 100644 --- a/src/common/handover.c +++ b/src/common/handover.c @@ -112,6 +112,7 @@ void handover_rach(struct gsm_lchan *lchan, uint8_t ra, uint8_t acc_delay) /* Set timing advance */ lchan->rqd_ta = acc_delay; + lchan->want_dl_sacch_active = true; /* Stop handover detection, wait for valid frame */ lchan->ho.active = HANDOVER_WAIT_FRAME; diff --git a/src/common/rsl.c b/src/common/rsl.c index cb9c19b3..a0c1fb21 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1095,6 +1095,7 @@ static int rsl_rx_chan_activ(struct msgb *msg) struct tlv_parsed tp; uint8_t type; int rc; + bool ms_power_present = false; if (lchan->state != LCHAN_S_NONE) { LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "error: lchan is not available, but in state: %s.\n", @@ -1188,6 +1189,7 @@ static int rsl_rx_chan_activ(struct msgb *msg) if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) { lchan->ms_power_ctrl.max = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F; lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max; + ms_power_present = true; } /* 9.3.24 Timing Advance */ if (TLVP_PRES_LEN(&tp, RSL_IE_TIMING_ADVANCE, 1)) @@ -1310,6 +1312,18 @@ static int rsl_rx_chan_activ(struct msgb *msg) return 0; } + /* Indicate which SAPIs should be enabled before the first RACH is received, for handover. See 3GPP TS 48.058 + * 4.1.3 and 4.1.4. */ + switch (type) { + case RSL_ACT_INTER_ASYNC: + case RSL_ACT_INTER_SYNC: + lchan->want_dl_sacch_active = ms_power_present; + break; + default: + lchan->want_dl_sacch_active = true; + break; + } + /* Remember to send an RSL ACK once the lchan is active */ lchan->rel_act_kind = LCHAN_REL_ACT_RSL; |