fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/38723?usp=email )
Change subject: osmo-bts-trx: fix scheduling of DL FACCH/H for TCH/H4.8 and TCH/H2.4 ......................................................................
osmo-bts-trx: fix scheduling of DL FACCH/H for TCH/H4.8 and TCH/H2.4
The mapping sched_tchh_dl_csd_map[] is valid for DL TCH/H4.8 and TCH/H2.4, but not for DL FACCH/H. We already use a separate lookup table sched_tchh_dl_facch_map[] when sending RTS.ind for DL FACCH/H, so no additional checks are added in this commit.
Change-Id: Idb753fa5c87dc79e9ad19e550680de6f462eed69 Fixes: 95407f3f6 ("osmo-bts-trx: implement CSD scheduling support") Related: OS#1572, OS#6618 --- M src/osmo-bts-trx/sched_lchan_tchh.c 1 file changed, 14 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/23/38723/1
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c index 6027072..01ac155 100644 --- a/src/osmo-bts-trx/sched_lchan_tchh.c +++ b/src/osmo-bts-trx/sched_lchan_tchh.c @@ -420,12 +420,6 @@ memmove(BUFPOS(bursts_p, 0), BUFPOS(bursts_p, 2), 20 * BPLEN); memset(BUFPOS(bursts_p, 20), 0, 2 * BPLEN);
- /* for half-rate CSD we dequeue every 4th burst */ - if (chan_state->rsl_cmode == RSL_CMOD_SPD_DATA) { - if (!sched_tchh_dl_csd_map[br->fn % 26]) - goto send_burst; - } - /* dequeue a TCH and/or a FACCH message to be transmitted */ tch_dl_dequeue(l1ts, br, &msg_tch, &msg_facch);
@@ -529,17 +523,25 @@ break; /* CSD (TCH/H4.8): 6.0 kbit/s radio interface rate */ case GSM48_CMODE_DATA_6k0: - if (msg_tch == NULL) - msg_tch = tch_dummy_msgb(4 * 60, 0x01); - gsm0503_tch_hr48_encode(BUFPOS(bursts_p, 0), msgb_l2(msg_tch)); + /* for half-rate CSD we run the encoder every 4th burst (like for TCH/F) + * because the interleaving is done as specified for the TCH/F9.6 */ + if (sched_tchh_dl_csd_map[br->fn % 26]) { + if (msg_tch == NULL) + msg_tch = tch_dummy_msgb(4 * 60, 0x01); + gsm0503_tch_hr48_encode(BUFPOS(bursts_p, 0), msgb_l2(msg_tch)); + } if (msg_facch != NULL) gsm0503_tch_hr_facch_encode(BUFPOS(bursts_p, 0), msgb_l2(msg_facch)); break; /* CSD (TCH/H2.4): 3.6 kbit/s radio interface rate */ case GSM48_CMODE_DATA_3k6: - if (msg_tch == NULL) - msg_tch = tch_dummy_msgb(4 * 36, 0x01); - gsm0503_tch_hr24_encode(BUFPOS(bursts_p, 0), msgb_l2(msg_tch)); + /* for half-rate CSD we run the encoder every 4th burst (like for TCH/F) + * because the interleaving is done as specified for the TCH/F9.6 */ + if (sched_tchh_dl_csd_map[br->fn % 26]) { + if (msg_tch == NULL) + msg_tch = tch_dummy_msgb(4 * 36, 0x01); + gsm0503_tch_hr24_encode(BUFPOS(bursts_p, 0), msgb_l2(msg_tch)); + } if (msg_facch != NULL) gsm0503_tch_hr_facch_encode(BUFPOS(bursts_p, 0), msgb_l2(msg_facch)); break;