aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-06-24 16:50:00 +0200
committerHarald Welte <laforge@gnumonks.org>2017-07-02 07:02:29 +0000
commit9b97d0f683bccd71b035ece1a6caebfc0f26d1b1 (patch)
tree66f37b6f59f617053149b5cf8d18502ebc0880a8 /src
parenta38d34112fb46c90ec4cb12c597778e65cceaef8 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bts-trx/scheduler_trx.c35
1 files changed, 5 insertions, 30 deletions
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index a9bcbda3..4c3330fa 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -471,42 +471,15 @@ inval_mode1:
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 @@ bfi:
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 */