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. Change subject: TRX: permit transmission of all-zero loopback frames ...................................................................... TRX: permit transmission of all-zero loopback frames For some reason, osmo-bts-trx attempted to interpret/validate the contents of the downlink TCH block that it was about to transmit. If such checks are made, they should clearly be in the common part above L1SAP, and not in the bts-model specific part. Also, having the checks in place didn't allow us to send an all-zero downlink block, as is required for detection of uplink FER in a loopback testing setup, e.g. with CMU-300. Change-Id: I6388de98e4a7e20843a1be88a58bba8d2c9aa0d5 --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 5 insertions(+), 30 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index a9bcbda..4c3330f 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -471,42 +471,15 @@ switch (tch_mode) { case GSM48_CMODE_SPEECH_V1: /* FR / HR */ - if (chan != TRXC_TCHF) { /* HR */ + if (chan != TRXC_TCHF) /* HR */ len = 15; - if (msgb_l2len(msg_tch) >= 1 - && (msg_tch->l2h[0] & 0xf0) != 0x00) { - LOGP(DL1C, LOGL_NOTICE, "%s " - "Transmitting 'bad " - "HR frame' trx=%u ts=%u at " - "fn=%u.\n", - trx_chan_desc[chan].name, - l1t->trx->nr, tn, fn); - goto free_bad_msg; - } - break; - } - len = GSM_FR_BYTES; - if (msgb_l2len(msg_tch) >= 1 - && (msg_tch->l2h[0] >> 4) != 0xd) { - LOGP(DL1C, LOGL_NOTICE, "%s Transmitting 'bad " - "FR frame' trx=%u ts=%u at fn=%u.\n", - trx_chan_desc[chan].name, - l1t->trx->nr, tn, fn); - goto free_bad_msg; - } + else + len = GSM_FR_BYTES; break; case GSM48_CMODE_SPEECH_EFR: /* EFR */ if (chan != TRXC_TCHF) goto inval_mode2; len = GSM_EFR_BYTES; - if (msgb_l2len(msg_tch) >= 1 - && (msg_tch->l2h[0] >> 4) != 0xc) { - LOGP(DL1C, LOGL_NOTICE, "%s Transmitting 'bad " - "EFR frame' trx=%u ts=%u at fn=%u.\n", - trx_chan_desc[chan].name, - l1t->trx->nr, tn, fn); - goto free_bad_msg; - } break; case GSM48_CMODE_SPEECH_AMR: /* AMR */ len = osmo_amr_rtp_dec(msg_tch->l2h, msgb_l2len(msg_tch), @@ -1146,10 +1119,12 @@ if (lchan->tch.dtx.ul_sid) return 0; /* DTXu: pause in progress */ memset(tch_data, 0, GSM_FR_BYTES); + tch_data[0] = 0xd0; rc = GSM_FR_BYTES; break; case GSM48_CMODE_SPEECH_EFR: /* EFR */ memset(tch_data, 0, GSM_EFR_BYTES); + tch_data[0] = 0xc0; rc = GSM_EFR_BYTES; break; case GSM48_CMODE_SPEECH_AMR: /* AMR */ -- To view, visit https://gerrit.osmocom.org/3082 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6388de98e4a7e20843a1be88a58bba8d2c9aa0d5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder