aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-08-01 02:16:30 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-08-01 02:35:07 +0700
commit5d17b97a5b762b695157f4cb86d7282888267cb8 (patch)
tree6f62c9547455115b5e9e314b4dfafd9bd58144e5
parent6575f0c3e90ff972a98c077312116c7070567028 (diff)
Clarify frame loss counter for l1sched_chan_state
Each logical channel (e.g. SACCH, SDCCH, etc.) has a counter of lost L2 frames. Let's use a bit better name for it, and correct its description in the 'l1sched_chan_state' struct definition. Change-Id: I92ef95f6b3f647170cfd434a970701406b0a7c82
-rw-r--r--include/osmo-bts/scheduler.h2
-rw-r--r--src/common/scheduler.c6
-rw-r--r--src/osmo-bts-trx/scheduler_trx.c4
-rw-r--r--src/osmo-bts-virtual/scheduler_virtbts.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h
index 98f38d39..3fe7978c 100644
--- a/include/osmo-bts/scheduler.h
+++ b/include/osmo-bts/scheduler.h
@@ -78,7 +78,7 @@ struct l1sched_chan_state {
int32_t toa256_sum; /* sum of TOA values (1/256 symbol) */
/* loss detection */
- uint8_t lost; /* (SACCH) loss detection */
+ uint8_t lost_frames; /* how many L2 frames were lost */
/* mode */
uint8_t rsl_cmode, tch_mode; /* mode for TCH channels */
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 38428103..5c250e4d 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -367,7 +367,7 @@ int _sched_compose_ph_data_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
memcpy(msg->l2h, l2, l2_len);
if (L1SAP_IS_LINK_SACCH(trx_chan_desc[chan].link_id))
- l1ts->chan_state[chan].lost = 0;
+ l1ts->chan_state[chan].lost_frames = 0;
/* forward primitive */
l1sap_up(l1t->trx, l1sap);
@@ -396,8 +396,8 @@ int _sched_compose_tch_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
if (tch_len)
memcpy(msg->l2h, tch, tch_len);
- if (l1ts->chan_state[chan].lost)
- l1ts->chan_state[chan].lost--;
+ if (l1ts->chan_state[chan].lost_frames)
+ l1ts->chan_state[chan].lost_frames--;
LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, -1, l1sap->u.data.fn,
"%s Rx -> RTP: %s\n",
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index a22b53f6..4ab937a7 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -192,7 +192,7 @@ got_msg:
/* handle loss detection of SACCH */
if (L1SAP_IS_LINK_SACCH(trx_chan_desc[chan].link_id)) {
/* count and send BFI */
- if (++(l1ts->chan_state[chan].lost) > 1) {
+ if (++(l1ts->chan_state[chan].lost_frames) > 1) {
/* TODO: Should we pass old TOA here? Otherwise we risk
* unnecessary decreasing TA */
@@ -351,7 +351,7 @@ static void tx_tch_common(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
/* handle loss detection of received TCH frames */
if (rsl_cmode == RSL_CMOD_SPD_SPEECH
- && ++(chan_state->lost) > 5) {
+ && ++(chan_state->lost_frames) > 5) {
uint8_t tch_data[GSM_FR_BYTES];
int len;
diff --git a/src/osmo-bts-virtual/scheduler_virtbts.c b/src/osmo-bts-virtual/scheduler_virtbts.c
index de995e6f..cdbb9c1f 100644
--- a/src/osmo-bts-virtual/scheduler_virtbts.c
+++ b/src/osmo-bts-virtual/scheduler_virtbts.c
@@ -198,7 +198,7 @@ static void tx_tch_common(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
#if 0
/* handle loss detection of received TCH frames */
if (rsl_cmode == RSL_CMOD_SPD_SPEECH
- && ++(chan_state->lost) > 5) {
+ && ++(chan_state->lost_frames) > 5) {
uint8_t tch_data[GSM_FR_BYTES];
int len;