fixeria has uploaded this change for review.

View Change

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
---
M include/osmo-bts/scheduler.h
M src/osmo-bts-trx/sched_lchan_pdtch.c
M src/osmo-bts-trx/sched_lchan_tchf.c
M src/osmo-bts-trx/sched_lchan_tchh.c
M src/osmo-bts-trx/sched_lchan_xcch.c
M src/osmo-bts-trx/scheduler_trx.c
6 files changed, 21 insertions(+), 21 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/48/27548/1
diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h
index d640647..8643edd 100644
--- a/include/osmo-bts/scheduler.h
+++ b/include/osmo-bts/scheduler.h
@@ -307,17 +307,17 @@
/* 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,
diff --git a/src/osmo-bts-trx/sched_lchan_pdtch.c b/src/osmo-bts-trx/sched_lchan_pdtch.c
index 6a2ad0d..92bb5a8 100644
--- a/src/osmo-bts-trx/sched_lchan_pdtch.c
+++ b/src/osmo-bts-trx/sched_lchan_pdtch.c
@@ -101,7 +101,7 @@
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) {
diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c
index 1bf67a0..0388ec0 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -55,7 +55,7 @@
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 @@
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;
}

diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index 5d2c12c..8264163 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -64,7 +64,7 @@
* 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 @@
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 @@

/* 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 */
diff --git a/src/osmo-bts-trx/sched_lchan_xcch.c b/src/osmo-bts-trx/sched_lchan_xcch.c
index 6a65574..1d529f2 100644
--- a/src/osmo-bts-trx/sched_lchan_xcch.c
+++ b/src/osmo-bts-trx/sched_lchan_xcch.c
@@ -111,7 +111,7 @@
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) {
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index 3a6418b..74de902 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -647,27 +647,27 @@

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:

To view, visit change 27548. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I96a8dd08084c7c179f879fc00e75c5edcfb11caa
Gerrit-Change-Number: 27548
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-MessageType: newchange