This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Max gerrit-no-reply at lists.osmocom.orgMax has submitted this change and it was merged. ( https://gerrit.osmocom.org/6315 ) Change subject: osmo-bts-trx: add extended (11-bit) RACH support ...................................................................... osmo-bts-trx: add extended (11-bit) RACH support Attempt to decode incoming RACH burst as 11-bit first and fallback to 8-bit if unsuccessful. Change-Id: Ia28741603636406744e5e22ffff1fb7a9689955a Related: OS#1854 --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 38 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified tnt: Looks good to me, but someone else must approve Vadim Yanitskiy: Looks good to me, but someone else must approve Max: Looks good to me, approved diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 1b0ba73..b395479 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -716,18 +716,29 @@ uint8_t chan_nr; struct osmo_phsap_prim l1sap; int n_errors, n_bits_total; + bool is_11bit = true; + uint16_t ra11; uint8_t ra; - int rc; + int rc = 1; chan_nr = trx_chan_desc[chan].chan_nr | tn; LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received RACH toa=%d\n", toa256); - /* decode */ - rc = gsm0503_rach_decode_ber(&ra, bits + 8 + 41, l1t->trx->bts->bsic, &n_errors, &n_bits_total); + if (chan == TRXC_RACH) /* Attempt to decode as extended (11-bit) RACH first */ + rc = gsm0503_rach_ext_decode_ber(&ra11, 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; + /* Indicate non-extended RACH */ + is_11bit = false; + + /* Fall-back to the normal RACH decoding */ + 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; + } } /* compose primitive */ @@ -736,17 +747,34 @@ osmo_prim_init(&l1sap.oph, SAP_GSM_PH, PRIM_PH_RACH, PRIM_OP_INDICATION, NULL); l1sap.u.rach_ind.chan_nr = chan_nr; - l1sap.u.rach_ind.ra = ra; l1sap.u.rach_ind.acc_delay = (toa256 >= 0) ? toa256/256 : 0; l1sap.u.rach_ind.fn = 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 = toa256; + if (is_11bit) { + l1sap.u.rach_ind.is_11bit = 1; + l1sap.u.rach_ind.ra = ra11; + l1sap.u.rach_ind.burst_type = BSIC2BCC(l1t->trx->bts->bsic); + switch (l1sap.u.rach_ind.burst_type) { + case GSM_L1_BURST_TYPE_ACCESS_0: + case GSM_L1_BURST_TYPE_ACCESS_1: + case GSM_L1_BURST_TYPE_ACCESS_2: + break; + default: + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, + "Received RACH frame with unexpected TSC %u, " + "forcing default %u\n", l1sap.u.rach_ind.burst_type, + GSM_L1_BURST_TYPE_ACCESS_0); + l1sap.u.rach_ind.burst_type = GSM_L1_BURST_TYPE_ACCESS_0; + } + } else { + l1sap.u.rach_ind.is_11bit = 0; + l1sap.u.rach_ind.ra = ra; + l1sap.u.rach_ind.burst_type = GSM_L1_BURST_TYPE_ACCESS_0; + } + /* forward primitive */ l1sap_up(l1t->trx, &l1sap); -- To view, visit https://gerrit.osmocom.org/6315 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia28741603636406744e5e22ffff1fb7a9689955a Gerrit-Change-Number: 6315 Gerrit-PatchSet: 7 Gerrit-Owner: Max <msuraev at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max <msuraev at sysmocom.de> Gerrit-Reviewer: Stefan Sperling <stsp at stsp.name> Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com> Gerrit-Reviewer: tnt <tnt at 246tNt.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190214/487d29a2/attachment.htm>