aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/rsl.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-11-04 13:31:41 +0000
committerlaforge <laforge@osmocom.org>2020-11-26 09:22:38 +0000
commitf733cf826375a3f348b6195b286af872beef0ff7 (patch)
treeedc148cdc37db95decef7f7236705dfcca180e9e /src/common/rsl.c
parentda680071a62c903333b93913fb56907a338f98fa (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
Diffstat (limited to 'src/common/rsl.c')
-rw-r--r--src/common/rsl.c14
1 files changed, 14 insertions, 0 deletions
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;