summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/include
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-07-12 01:25:13 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-07-12 03:49:51 +0700
commitd84b2ed6eda89d8e055d0073b50e3cc6e2b31a95 (patch)
treef1b8273d02d4ffa50b44654d8c0b29992c82dbbc /src/host/trxcon/include
parent60215bc051c96d87c552ece42d594be7f7388c4f (diff)
trxcon/l1sched: fix handling of UL FACCH on TCH/A[FH]S
In ad8f7794 I changed both tx_tch[fh]_fn() to use a switch statement and introduced a regression by removing special treatment of FACCH: @@ -238,10 +237,16 @@ int tx_tchf_fn(struct l1sched_lchan_state *lchan, - if (msgb_l2len(lchan->prim) == GSM_MACBLOCK_LEN) { - /* Encode payload */ - rc = gsm0503_tch_fr_encode(buffer, msgb_l2(lchan->prim), GSM_MACBLOCK_LEN, 1); - } else if (lchan->tch_mode == GSM48_CMODE_SPEECH_AMR) { @@ -459,10 +458,15 @@ int tx_tchh_fn(struct l1sched_lchan_state *lchan, - if (msgb_l2len(lchan->prim) == GSM_MACBLOCK_LEN) { - rc = gsm0503_tch_hr_encode(buffer, msgb_l2(lchan->prim), GSM_MACBLOCK_LEN); - lchan->ul_facch_blocks = 6; - } else if (lchan->tch_mode == GSM48_CMODE_SPEECH_AMR) { Now if the channel mode is GSM48_CMODE_SPEECH_AMR, UL FACCH/[FH] frames will be fed to osmo_amr_rtp_dec(), which is definitely wrong. Fix this by doing all AMR specific checks in a separate function, which is called only for speech frames. Change-Id: Ie217bbb389b5abb95d241781ffe3f5c7b1c188c0 Fixes: ad8f7794 "trxcon/l1sched: remove redundant TCH/[FH] prim length checks" Related: OS#4396
Diffstat (limited to 'src/host/trxcon/include')
-rw-r--r--src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h
index d3b079ca..715b9a04 100644
--- a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h
+++ b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h
@@ -392,6 +392,7 @@ extern const uint8_t l1sched_nb_training_bits[8][26];
const char *l1sched_burst_mask2str(const uint8_t *mask, int bits);
size_t l1sched_bad_frame_ind(uint8_t *l2, struct l1sched_lchan_state *lchan);
+bool l1sched_lchan_amr_prim_is_valid(struct l1sched_lchan_state *lchan, bool is_cmr);
/* Interleaved TCH/H block TDMA frame mapping */
bool l1sched_tchh_block_map_fn(enum l1sched_lchan_type chan,