aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-03-11 18:37:46 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2021-03-11 18:42:00 +0100
commit7a7beb9b35d6b8507a9a3b282a248c8564faf972 (patch)
treef6bda563ed249005bdf1e190aaddceb0e8530ebd
parentbts-trx: Always submit rx PDTCH DATA.ind to l1sap (diff)
downloadOsmoBTS-7a7beb9b35d6b8507a9a3b282a248c8564faf972.tar.xz
OsmoBTS-7a7beb9b35d6b8507a9a3b282a248c8564faf972.zip
bts-trx: Avoid submitting first data_ind with FN=0 to upper layers
It can happen that the first burst we receive after enabling the PDCH channel (when PCU connects to the BTS) is bid!=0. As a result, chan_state->ul_first_fn is never set and defautl value 0 in there is passed to the upper layers. As a result, when the 2nd block is transmitted, this time with correct FN, the PCU will see a huge jump in FNs. Since in PDCH the bursts are always consecutive, let's simply use bi->fn - 3 as a first_fn and be done with the issue. Related: OS#5020 Change-Id: Ie982caeb29f3ffd880b44e88a89b85ea3e6e6947
-rw-r--r--src/osmo-bts-trx/sched_lchan_pdtch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osmo-bts-trx/sched_lchan_pdtch.c b/src/osmo-bts-trx/sched_lchan_pdtch.c
index 665f643e..5e61a1dd 100644
--- a/src/osmo-bts-trx/sched_lchan_pdtch.c
+++ b/src/osmo-bts-trx/sched_lchan_pdtch.c
@@ -44,7 +44,7 @@ int rx_pdtch_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, bi->tn);
struct l1sched_chan_state *chan_state = &l1ts->chan_state[chan];
sbit_t *burst, **bursts_p = &chan_state->ul_bursts;
- uint32_t *first_fn = &chan_state->ul_first_fn;
+ uint32_t first_fn;
uint8_t *mask = &chan_state->ul_mask;
struct l1sched_meas_set meas_avg;
uint8_t l2[EGPRS_0503_MAX_BYTES];
@@ -70,7 +70,6 @@ int rx_pdtch_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
if (bid == 0) {
memset(*bursts_p, 0, GSM0503_EGPRS_BURSTS_NBITS);
*mask = 0x0;
- *first_fn = bi->fn;
}
/* update mask */
@@ -141,8 +140,9 @@ int rx_pdtch_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
ber10k = compute_ber10k(n_bits_total, n_errors);
+ first_fn = GSM_TDMA_FN_SUB(bi->fn, 3);
return _sched_compose_ph_data_ind(l1t, bi->tn,
- *first_fn, chan, l2, rc,
+ first_fn, chan, l2, rc,
meas_avg.rssi, meas_avg.toa256,
meas_avg.ci_cb, ber10k,
presence_info);