fixeria has uploaded this change for review.

View Change

osmo-bts-trx: rx_tchh_fn(): indicate BER10k=0 for FACCH BFIs

It makes no sense to store BER10k value of an Uplink FACCH frame
in order to indicate it in a BFI later on. Given that these BFIs
are generated artificially, it's fine to indicate BER10k=0.

Change-Id: I24d12892760dca0ad0a5c2abca9fc66523d9e614
Related: I1ad9fa3815feb2b4da608ab7df716a87ba1f2f91
---
M include/osmo-bts/scheduler.h
M src/osmo-bts-trx/sched_lchan_tchh.c
2 files changed, 2 insertions(+), 6 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/51/27551/1
diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h
index 1e1a2d7..2806117 100644
--- a/include/osmo-bts/scheduler.h
+++ b/include/osmo-bts/scheduler.h
@@ -126,7 +126,6 @@
uint8_t dl_ongoing_facch; /* FACCH/H on downlink */
uint8_t ul_ongoing_facch; /* FACCH/H on uplink */
struct l1sched_meas_set meas_avg_facch; /* measurement results for last FACCH */
- uint16_t ber10k_facch; /* bit error rate for last FACCH */

uint8_t dl_facch_bursts; /* number of remaining DL FACCH bursts */

diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index edbb566..4553132 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -68,7 +68,7 @@
struct l1sched_meas_set meas_avg;
unsigned int fn_begin;
unsigned int fn_tch_end;
- uint16_t ber10k;
+ uint16_t ber10k = 0;
uint8_t is_sub = 0;
uint8_t ft;
bool mask_stolen_tch_block = false;
@@ -127,7 +127,6 @@
memcpy(*bursts_p + 232, *bursts_p + 464, 232);
/* we have already sent the first BFI when a FACCH/H frame
* was decoded (see below), now send the second one. */
- ber10k = 0;
memset(&meas_avg, 0, sizeof(meas_avg));
/* In order to provide an even stream of measurement reports
* we ask the code below to mask the missing TCH/H block
@@ -289,12 +288,12 @@
* measurement result for the one missing TCH block
* measurement */
memcpy(&chan_state->meas_avg_facch, &meas_avg, sizeof(meas_avg));
- chan_state->ber10k_facch = ber10k;

/* Invalidate the current measurement result to prevent the
* code below from handing up the current measurement a second
* time. */
memset(&meas_avg, 0, sizeof(meas_avg));
+ ber10k = 0;
bfi:
/* A FACCH/H frame replaces two speech frames, so we need to send two BFIs.
* One is sent here, another will be sent two bursts later (see above). */
@@ -371,9 +370,7 @@
* from the FACCH transmission. */
if (mask_stolen_tch_block) {
memcpy(&meas_avg, &chan_state->meas_avg_facch, sizeof(meas_avg));
- ber10k = chan_state->ber10k_facch;
memset(&chan_state->meas_avg_facch, 0, sizeof(meas_avg));
- chan_state->ber10k_facch = 0;
}

return _sched_compose_tch_ind(l1ts, fn_begin, bi->chan, tch_data, rc,

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

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