aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-trx
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-16 01:51:03 +0700
committerfixeria <vyanitskiy@sysmocom.de>2022-05-06 12:55:18 +0000
commit8aab8d484bdf8e3f499ee1dfd38b573d829028ac (patch)
treef2d7e613aa5e1cfde1b6332d3afee9c81bc6c938 /src/osmo-bts-trx
parent4cbc2acde83f3a9be2e2d35c7c89d5ea780d81be (diff)
osmo-bts-trx: drop Uplink loss detection from Downlink path
Attempting to detect missing Uplink frames in the *Downlink* path is an ugly hack, that was needed before we had proper per-lchan detection of missing bursts and NOPE indications in TRXDv1. * [1] per-lchan detection of missing bursts was fixed in Aug 2018. * [2] TRXDv1 support was introduced in Jul 2019. Today is 2022 and it makes no sense to keep this hack. Even if the transceiver does not support TRXDv1, per-lchan detection will compensate the missing Uplink bursts. Change-Id: Ic292d180ba64206fb4d88adb284f9f9d058b4587 Related: [1] I70d05b67a35ddcbdd1b6394dbd7198404a440e76 Related: [2] If61c71d20d590bf07bfd019afb33000a0b6135bd
Diffstat (limited to 'src/osmo-bts-trx')
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchf.c53
-rw-r--r--src/osmo-bts-trx/sched_lchan_xcch.c15
2 files changed, 0 insertions, 68 deletions
diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c
index 20abfe1a..6a90327b 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -332,59 +332,6 @@ struct msgb *tch_dl_dequeue(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br
uint8_t tch_mode = chan_state->tch_mode;
struct osmo_phsap_prim *l1sap;
- /* handle loss detection of received TCH frames */
- if (rsl_cmode == RSL_CMOD_SPD_SPEECH
- && ++(chan_state->lost_frames) > 5) {
- uint8_t tch_data[GSM_FR_BYTES];
- int len;
-
- LOGL1SB(DL1P, LOGL_NOTICE, l1ts, br, "Missing TCH bursts detected, sending BFI\n");
-
- /* indicate bad frame */
- switch (tch_mode) {
- case GSM48_CMODE_SPEECH_V1: /* FR / HR */
- if (br->chan != TRXC_TCHF) { /* HR */
- tch_data[0] = 0x70; /* F = 0, FT = 111 */
- memset(tch_data + 1, 0, 14);
- len = 15;
- break;
- }
- memset(tch_data, 0, GSM_FR_BYTES);
- len = GSM_FR_BYTES;
- break;
- case GSM48_CMODE_SPEECH_EFR: /* EFR */
- if (br->chan != TRXC_TCHF)
- goto inval_mode1;
- memset(tch_data, 0, GSM_EFR_BYTES);
- len = GSM_EFR_BYTES;
- break;
- case GSM48_CMODE_SPEECH_AMR: /* AMR */
- len = osmo_amr_rtp_enc(tch_data,
- chan_state->codec[chan_state->dl_cmr],
- chan_state->codec[chan_state->dl_ft], AMR_BAD);
- if (len < 2) {
- LOGL1SB(DL1P, LOGL_ERROR, l1ts, br,
- "Failed to encode AMR_BAD frame (rc=%d), "
- "not sending BFI\n", len);
- len = 0;
- break;
- }
- memset(tch_data + 2, 0, len - 2);
- break;
- default:
-inval_mode1:
- LOGL1SB(DL1P, LOGL_ERROR, l1ts, br, "TCH mode invalid, please fix!\n");
- len = 0;
- }
-
- if (len) {
- /* Note: RSSI/ToA256 is set to 0 to indicate to the higher
- * layers that this is a faked tch_ind */
- _sched_compose_tch_ind(l1ts, br->fn, br->chan,
- tch_data, len, 0, 10000, 0, 0, 0);
- }
- }
-
/* get frame and unlink from queue */
msg1 = _sched_dequeue_prim(l1ts, br);
msg2 = _sched_dequeue_prim(l1ts, br);
diff --git a/src/osmo-bts-trx/sched_lchan_xcch.c b/src/osmo-bts-trx/sched_lchan_xcch.c
index 1d529f28..e9366212 100644
--- a/src/osmo-bts-trx/sched_lchan_xcch.c
+++ b/src/osmo-bts-trx/sched_lchan_xcch.c
@@ -207,21 +207,6 @@ got_msg:
/* BURST BYPASS */
- /* handle loss detection of SACCH */
- if (L1SAP_IS_LINK_SACCH(trx_chan_desc[br->chan].link_id)) {
- /* count and send BFI */
- if (++(l1ts->chan_state[br->chan].lost_frames) > 1) {
- /* TODO: Should we pass old TOA here? Otherwise we risk
- * unnecessary decreasing TA */
-
- /* Note: RSSI is set to 0 to indicate to the higher
- * layers that this is a faked ph_data_ind */
- _sched_compose_ph_data_ind(l1ts, 0, br->chan, NULL, 0,
- 0, 0, 0, 10000,
- PRES_INFO_INVALID);
- }
- }
-
/* allocate burst memory, if not already */
if (!*bursts_p) {
*bursts_p = talloc_zero_size(l1ts, 464);