diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-02-26 11:57:49 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-02-27 17:27:35 +0100 |
commit | c2b4c668f3510b7b0baace749c5a310959010e90 (patch) | |
tree | e4796019dc76a1655ab4a0f99e79b27636126e0b /src/osmo-bts-trx | |
parent | b60d9e9464dabba64e7ba73a1a8f41adab21ff31 (diff) |
Move rach_busy counting above L1SAP
In the past, rach_busy counting was performed below L1SAP, while
reporting was handled above. This lead to subtle differences between
the BTS models, such as osmo-bts-trx missing to increment rach_busy.
Let's move the rach_busy counting above L1SAP to share more code.
This means we need libosmocore Change-Id
I9439810c3a3ad89ea0302753617b850749af887c for the additional required
parameters in ph_rach_ind_param, as well as libosmocore Change-id
I2b1926a37bde860dcfeb0d613eb55a71271928c5 for osmo-bts-trx to determine
the RACH bit error rate.
Change-Id: I3b989580cb38082e3fd8fc50a11fedda13991092
Closes: OS#3003
Diffstat (limited to 'src/osmo-bts-trx')
-rw-r--r-- | src/osmo-bts-trx/scheduler_trx.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index f53e4828..43cc30b0 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -718,6 +718,7 @@ int rx_rach_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, { uint8_t chan_nr; struct osmo_phsap_prim l1sap; + int n_errors, n_bits_total; uint8_t ra; int rc; @@ -726,7 +727,7 @@ int rx_rach_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received RACH toa=%.2f\n", toa); /* decode */ - rc = gsm0503_rach_decode(&ra, bits + 8 + 41, l1t->trx->bts->bsic); + rc = gsm0503_rach_decode_ber(&ra, bits + 8 + 41, l1t->trx->bts->bsic, &n_errors, &n_bits_total); if (rc) { LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad AB frame\n"); return 0; @@ -749,6 +750,9 @@ int rx_rach_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, /* 11bit RACH is not supported for osmo-trx */ l1sap.u.rach_ind.is_11bit = 0; l1sap.u.rach_ind.burst_type = GSM_L1_BURST_TYPE_ACCESS_0; + l1sap.u.rach_ind.rssi = rssi; + l1sap.u.rach_ind.ber10k = compute_ber10k(n_bits_total, n_errors); + l1sap.u.rach_ind.acc_delay_256bits = 256*toa; /* forward primitive */ l1sap_up(l1t->trx, &l1sap); |