osmo-bts-trx: use consistent naming for 'enum sched_meas_avg_mode'

This is a purely cosmetic change.  The new naming clearly indicates
how deep to go back in the measurement history (S) and how many
samples to average (N).  For example:

* SCHED_MEAS_AVG_M_S4N4 - go S=4 steps back and average N=4 samples;
* SCHED_MEAS_AVG_M_S6N2 - go S=6 steps back and average N=2 samples.

Change-Id: I96a8dd08084c7c179f879fc00e75c5edcfb11caa
This commit is contained in:
Vadim Yanitskiy 2022-03-17 18:36:36 +03:00
parent 4e9affee0b
commit 2de4d9baa8
6 changed files with 21 additions and 21 deletions

View File

@ -307,17 +307,17 @@ int trx_sched_ul_burst(struct l1sched_ts *l1ts, struct trx_ul_burst_ind *bi);
/* Averaging mode for trx_sched_meas_avg() */
enum sched_meas_avg_mode {
/* last 4 bursts (default for xCCH, TCH/H, PTCCH and PDTCH) */
SCHED_MEAS_AVG_M_QUAD,
SCHED_MEAS_AVG_M_S4N4,
/* last 8 bursts (default for TCH/F and FACCH/F) */
SCHED_MEAS_AVG_M_OCTO,
SCHED_MEAS_AVG_M_S8N8,
/* last 6 bursts (default for FACCH/H) */
SCHED_MEAS_AVG_M_SIX,
SCHED_MEAS_AVG_M_S6N6,
/* first 4 of last 8 bursts */
SCHED_MEAS_AVG_M8_FIRST_QUAD,
SCHED_MEAS_AVG_M_S8N4,
/* first 2 of last 6 bursts */
SCHED_MEAS_AVG_M6_FIRST_TWO,
SCHED_MEAS_AVG_M_S6N2,
/* middle 2 of last 6 bursts */
SCHED_MEAS_AVG_M6_MIDDLE_TWO,
SCHED_MEAS_AVG_M_S4N2,
};
void trx_sched_meas_push(struct l1sched_chan_state *chan_state,

View File

@ -101,7 +101,7 @@ int rx_pdtch_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
return 0;
/* average measurements of the last 4 bursts */
trx_sched_meas_avg(chan_state, &meas_avg, SCHED_MEAS_AVG_M_QUAD);
trx_sched_meas_avg(chan_state, &meas_avg, SCHED_MEAS_AVG_M_S4N4);
/* check for complete set of bursts */
if ((*mask & 0xf) != 0xf) {

View File

@ -55,7 +55,7 @@ int rx_tchf_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
uint8_t rsl_cmode = chan_state->rsl_cmode;
uint8_t tch_mode = chan_state->tch_mode;
uint8_t tch_data[128]; /* just to be safe */
enum sched_meas_avg_mode meas_avg_mode = SCHED_MEAS_AVG_M_OCTO;
enum sched_meas_avg_mode meas_avg_mode = SCHED_MEAS_AVG_M_S8N8;
struct l1sched_meas_set meas_avg;
int rc, amr = 0;
int n_errors = 0;
@ -175,11 +175,11 @@ int rx_tchf_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
switch (chan_state->amr_last_dtx) {
case AFS_SID_FIRST:
case AFS_SID_UPDATE_CN:
meas_avg_mode = SCHED_MEAS_AVG_M8_FIRST_QUAD;
meas_avg_mode = SCHED_MEAS_AVG_M_S8N4;
break;
case AFS_SID_UPDATE:
case AFS_ONSET:
meas_avg_mode = SCHED_MEAS_AVG_M_QUAD;
meas_avg_mode = SCHED_MEAS_AVG_M_S4N4;
break;
}

View File

@ -64,7 +64,7 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
* Even FN ending at: 10,11,19,20,2,3
*/
int fn_is_odd = (((bi->fn + 26 - 10) % 26) >> 2) & 1;
enum sched_meas_avg_mode meas_avg_mode = SCHED_MEAS_AVG_M_QUAD;
enum sched_meas_avg_mode meas_avg_mode = SCHED_MEAS_AVG_M_S4N4;
struct l1sched_meas_set meas_avg;
unsigned int fn_begin;
unsigned int fn_tch_end;
@ -214,10 +214,10 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
case AHS_SID_UPDATE_CN:
case AHS_SID_FIRST_INH:
case AHS_SID_UPDATE_INH:
meas_avg_mode = SCHED_MEAS_AVG_M6_FIRST_TWO;
meas_avg_mode = SCHED_MEAS_AVG_M_S6N2;
break;
case AHS_ONSET:
meas_avg_mode = SCHED_MEAS_AVG_M6_MIDDLE_TWO;
meas_avg_mode = SCHED_MEAS_AVG_M_S4N2;
break;
}
@ -250,7 +250,7 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
/* average measurements of the last N (depends on mode) bursts */
if (rc == GSM_MACBLOCK_LEN)
meas_avg_mode = SCHED_MEAS_AVG_M_SIX;
meas_avg_mode = SCHED_MEAS_AVG_M_S6N6;
trx_sched_meas_avg(chan_state, &meas_avg, meas_avg_mode);
/* Check if the frame is bad */

View File

@ -111,7 +111,7 @@ int rx_data_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
return 0;
/* average measurements of the last 4 bursts */
trx_sched_meas_avg(chan_state, &meas_avg, SCHED_MEAS_AVG_M_QUAD);
trx_sched_meas_avg(chan_state, &meas_avg, SCHED_MEAS_AVG_M_S4N4);
/* check for complete set of bursts */
if ((*mask & 0xf) != 0xf) {

View File

@ -647,27 +647,27 @@ void trx_sched_meas_avg(const struct l1sched_chan_state *chan_state,
switch (mode) {
/* last 4 bursts (default for xCCH, TCH/H, PTCCH and PDTCH) */
case SCHED_MEAS_AVG_M_QUAD:
case SCHED_MEAS_AVG_M_S4N4:
n = 4; shift = n;
break;
/* last 8 bursts (default for TCH/F and FACCH/F) */
case SCHED_MEAS_AVG_M_OCTO:
case SCHED_MEAS_AVG_M_S8N8:
n = 8; shift = n;
break;
/* last 6 bursts (default for FACCH/H) */
case SCHED_MEAS_AVG_M_SIX:
case SCHED_MEAS_AVG_M_S6N6:
n = 6; shift = n;
break;
/* first 4 of last 8 bursts */
case SCHED_MEAS_AVG_M8_FIRST_QUAD:
case SCHED_MEAS_AVG_M_S8N4:
n = 4; shift = 8;
break;
/* first 2 of last 6 bursts */
case SCHED_MEAS_AVG_M6_FIRST_TWO:
case SCHED_MEAS_AVG_M_S6N2:
n = 2; shift = 6;
break;
/* middle 2 of last 6 bursts */
case SCHED_MEAS_AVG_M6_MIDDLE_TWO:
case SCHED_MEAS_AVG_M_S4N2:
n = 2; shift = 4;
break;
default: