aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-03-18 03:57:01 +0300
committerfixeria <vyanitskiy@sysmocom.de>2022-04-05 13:45:31 +0000
commitbd7ef4101b3fdfdac835f1f3c68832217b987444 (patch)
tree8717a3b497cd34235e6ef5c5e335e6d11d21f8ca
parent7a2f307246973ffa89a1fb667652f0b8ba7208c1 (diff)
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
-rw-r--r--include/osmo-bts/scheduler.h1
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchh.c7
2 files changed, 2 insertions, 6 deletions
diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h
index 1e1a2d72..2806117b 100644
--- a/include/osmo-bts/scheduler.h
+++ b/include/osmo-bts/scheduler.h
@@ -126,7 +126,6 @@ struct l1sched_chan_state {
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 edbb5669..45531321 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -68,7 +68,7 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
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 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
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 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
* 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 @@ compose_l1sap:
* 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,