aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/rsl.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-11-22 14:00:19 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2020-01-03 12:56:00 +0100
commit66c17cfc2d5d2a68de0484562cef46d142dd2f4b (patch)
treea40ffeedf88785f0699e212971f020e558d2bb6d /src/common/rsl.c
parenta2392f0f9e07e6220c943b458360f1fddc1528b6 (diff)
rsl: ensure measurement reports are sent
osmo-bts currently does not generate a measurement report in case the SACCH of the related traffic channel is lost. This is a problem because the moment when reception gets bad measurmenet reporting is crucial to carry out handover decisions effectively. The presence of a SACCH block controls the conclusion of the measurement interval and the sending of the RSL measurement report. The latter one not only requires a measurmenet indication, it also requires a fully intact SACCH block. Lets use the NOPE / IDLE indications from V1 of the TRXD protocol to ensure a SACCH block is always reported up to l1sap.c. In cases where the SACCH is bad, trigger the sending of the RSL measurement report manually without attaching the measurmenet data from the MS (which we do not have in this case) Related: OS#2975 Depends: osmo-ttcn3-hacks Ib2f511991349ab15e02db9c5e45f0df3645835a4 Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2
Diffstat (limited to 'src/common/rsl.c')
-rw-r--r--src/common/rsl.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index b315d30f..d7e35654 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2834,8 +2834,8 @@ struct osmo_bts_supp_meas_info {
uint16_t toa256_std_dev;
} __attribute__((packed));
-/* 8.4.8 MEASUREMENT RESult */
-static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, const struct lapdm_entity *le)
+/* Compose and send 8.4.8 MEASUREMENT RESult via RSL */
+int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, const struct lapdm_entity *le)
{
struct msgb *msg;
uint8_t meas_res[16];
@@ -2895,9 +2895,12 @@ static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, con
msgb_tv_fixed_put(msg, RSL_IE_L1_INFO, 2, lchan->meas.l1_info);
lchan->meas.flags &= ~LC_UL_M_F_L1_VALID;
}
- msgb_tl16v_put(msg, RSL_IE_L3_INFO, l3_len, l3);
+
+ if (l3 && l3_len > 0)
+ msgb_tl16v_put(msg, RSL_IE_L3_INFO, l3_len, l3);
if (ms_to_valid(lchan)) {
- msgb_tv_put(msg, RSL_IE_MS_TIMING_OFFSET, ms_to2rsl(lchan, le));
+ if (l3 && l3_len > 0)
+ msgb_tv_put(msg, RSL_IE_MS_TIMING_OFFSET, ms_to2rsl(lchan, le));
lchan->ms_t_offs = -1;
lchan->p_offs = -1;
}