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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10270 ) Change subject: update scrambling only if we have good CRC ...................................................................... update scrambling only if we have good CRC When a bad frame is received, the scrambling should not be updated, because setting scrambling to wrong values will completely break further decoding (until another SYNC frame is received). Change-Id: I5e88b52fcbb98532d7ab6ca85e4f956589a595ab --- M src/lower_mac/tetra_lower_mac.c 1 file changed, 10 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/lower_mac/tetra_lower_mac.c b/src/lower_mac/tetra_lower_mac.c index 7b62bb4..1e8f2e8 100644 --- a/src/lower_mac/tetra_lower_mac.c +++ b/src/lower_mac/tetra_lower_mac.c @@ -229,14 +229,16 @@ printf("MCC %s(%u) ", osmo_ubit_dump(type2+31, 10), bits_to_uint(type2+31, 10)); printf("MNC %s(%u)\n", osmo_ubit_dump(type2+41, 14), bits_to_uint(type2+41, 14)); /* obtain information from SYNC PDU */ - tcd->colour_code = bits_to_uint(type2+4, 6); - tcd->time.tn = bits_to_uint(type2+10, 2); - tcd->time.fn = bits_to_uint(type2+12, 5); - tcd->time.mn = bits_to_uint(type2+17, 6); - tcd->mcc = bits_to_uint(type2+31, 10); - tcd->mnc = bits_to_uint(type2+41, 14); - /* compute the scrambling code for the current cell */ - tcd->scramb_init = tetra_scramb_get_init(tcd->mcc, tcd->mnc, tcd->colour_code); + if (tup->crc_ok) { + tcd->colour_code = bits_to_uint(type2+4, 6); + tcd->time.tn = bits_to_uint(type2+10, 2); + tcd->time.fn = bits_to_uint(type2+12, 5); + tcd->time.mn = bits_to_uint(type2+17, 6); + tcd->mcc = bits_to_uint(type2+31, 10); + tcd->mnc = bits_to_uint(type2+41, 14); + /* compute the scrambling code for the current cell */ + tcd->scramb_init = tetra_scramb_get_init(tcd->mcc, tcd->mnc, tcd->colour_code); + } /* update the PHY layer time */ memcpy(&t_phy_state.time, &tcd->time, sizeof(t_phy_state.time)); tup->lchan = TETRA_LC_BSCH; -- To view, visit https://gerrit.osmocom.org/10270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5e88b52fcbb98532d7ab6ca85e4f956589a595ab Gerrit-Change-Number: 10270 Gerrit-PatchSet: 2 Gerrit-Owner: Jan Hrach <jenda.2vf9h at hrach.eu> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180731/5dc2cfa1/attachment.htm>