osmo-bts-trx/scheduler: fix measurement handling for SUB frames

Make sure that we pick the correct UL measurements from the
history when we deal with AMR SID frames (SUB frames).

Change-Id: I902bb47d68742d2589156f61099b67a0edbaf40b
Related: OS#2978
This commit is contained in:
Philipp Maier 2020-06-23 06:11:20 +07:00 committed by laforge
parent b62612fbde
commit c41b94e93b
4 changed files with 43 additions and 0 deletions

View File

@ -276,6 +276,12 @@ enum sched_meas_avg_mode {
SCHED_MEAS_AVG_M_OCTO,
/* last 6 bursts (default for FACCH/H) */
SCHED_MEAS_AVG_M_SIX,
/* first 4 of last 8 bursts */
SCHED_MEAS_AVG_M8_FIRST_QUAD,
/* first 2 of last 6 bursts */
SCHED_MEAS_AVG_M6_FIRST_TWO,
/* middle 2 of last 6 bursts */
SCHED_MEAS_AVG_M6_MIDDLE_TWO,
};
void trx_sched_meas_push(struct l1sched_chan_state *chan_state,

View File

@ -173,6 +173,17 @@ int rx_tchf_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
break;
}
switch (chan_state->amr_last_dtx) {
case AFS_SID_FIRST:
case AFS_SID_UPDATE_CN:
meas_avg_mode = SCHED_MEAS_AVG_M8_FIRST_QUAD;
break;
case AFS_SID_UPDATE:
case AFS_ONSET:
meas_avg_mode = SCHED_MEAS_AVG_M_QUAD;
break;
}
if (rc)
trx_loop_amr_input(l1t,
trx_chan_desc[chan].chan_nr | bi->tn, chan_state,

View File

@ -184,6 +184,20 @@ int rx_tchh_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
break;
}
switch (chan_state->amr_last_dtx) {
case AHS_SID_FIRST_P1:
case AHS_SID_FIRST_P2:
case AHS_SID_UPDATE:
case AHS_SID_UPDATE_CN:
case AHS_SID_FIRST_INH:
case AHS_SID_UPDATE_INH:
meas_avg_mode = SCHED_MEAS_AVG_M6_FIRST_TWO;
break;
case AHS_ONSET:
meas_avg_mode = SCHED_MEAS_AVG_M6_MIDDLE_TWO;
break;
}
if (rc)
trx_loop_amr_input(l1t,
trx_chan_desc[chan].chan_nr | bi->tn, chan_state,

View File

@ -517,6 +517,18 @@ void trx_sched_meas_avg(const struct l1sched_chan_state *chan_state,
case SCHED_MEAS_AVG_M_SIX:
n = 6; shift = n;
break;
/* first 4 of last 8 bursts */
case SCHED_MEAS_AVG_M8_FIRST_QUAD:
n = 4; shift = 8;
break;
/* first 2 of last 6 bursts */
case SCHED_MEAS_AVG_M6_FIRST_TWO:
n = 2; shift = 6;
break;
/* middle 2 of last 6 bursts */
case SCHED_MEAS_AVG_M6_MIDDLE_TWO:
n = 2; shift = 4;
break;
default:
/* Shall not happen */
OSMO_ASSERT(false);