bts: Ignore first MEAS REP as it often contains bogus values

The first measurement report typically has bad performance as
it contains measurements taken before the MS actually started
to transmit on it.  Let's make sure we only validate all but
the first MEAS REP

Change-Id: I5edfdca0c2b5c63073dca7f12f9c0d447e37995c
This commit is contained in:
Harald Welte 2018-03-10 18:59:03 +01:00
parent d5684396e5
commit fa45e9ed8c
1 changed files with 12 additions and 2 deletions

View File

@ -108,6 +108,7 @@ type component ConnHdlr extends RSL_DchanHdlr {
var ConnHdlrPars g_pars;
var uint8_t g_next_meas_res_nr := 0;
var boolean g_first_meas_res := true;
}
function f_init_rsl(charstring id) runs on test_CT {
@ -858,8 +859,15 @@ altstep as_meas_res() runs on ConnHdlr {
repeat;
}
[] RSL.receive(tr_RSL_MEAS_RES(g_chan_nr, g_next_meas_res_nr)) -> value rsl {
setverdict(fail, "Received unspecific MEAS RES ", rsl);
self.stop;
/* increment counter of next to-be-expected meas rep */
g_next_meas_res_nr := (g_next_meas_res_nr + 1) mod 256;
if (g_first_meas_res) {
g_first_meas_res := false;
repeat;
} else {
setverdict(fail, "Received unspecific MEAS RES ", rsl);
self.stop;
}
}
[] RSL.receive(tr_RSL_MEAS_RES(?)) -> value rsl {
setverdict(fail, "Received unexpected MEAS RES ", rsl);
@ -904,6 +912,8 @@ private function f_est_dchan() runs on ConnHdlr {
ia_um := f_L1CTL_WAIT_IMM_ASS(L1CTL, ra, fn);
/* enable dedicated mode */
f_L1CTL_DM_EST_REQ_IA(L1CTL, ia_um);
g_first_meas_res := true;
}
/* establish DChan, verify existance + contents of measurement reports */