fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/27805 )
Change subject: osmo-bts-trx: fix scheduling of dummy FACCH/H and FACCH/F ......................................................................
osmo-bts-trx: fix scheduling of dummy FACCH/H and FACCH/F
* dl_ongoing_facch must be set for correct FACCH/H scheduling; * dl_facch_bursts must be set for FACCH overpower to work.
Also take a chance to move the payload into shared header file.
Change-Id: Ief12eb67ad80de3b71f5226858dc2e0c8ae76948 Related: SYS#5919, OS#4823 --- M src/osmo-bts-trx/sched_lchan_tchf.c M src/osmo-bts-trx/sched_lchan_tchh.c M src/osmo-bts-trx/sched_tch.h 3 files changed, 11 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/05/27805/1
diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c index 5466598..e82433c 100644 --- a/src/osmo-bts-trx/sched_lchan_tchf.c +++ b/src/osmo-bts-trx/sched_lchan_tchf.c @@ -328,14 +328,9 @@
/* no message at all, send a dummy L2 frame on FACCH */ if (msg == NULL) { - static const uint8_t dummy[GSM_MACBLOCK_LEN] = { - 0x03, 0x03, 0x01, /* TODO: use randomized padding */ - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - }; - LOGL1SB(DL1P, LOGL_DEBUG, l1ts, br, "No TCH or FACCH prim for transmit.\n"); - gsm0503_tch_fr_encode(*bursts_p, dummy, sizeof(dummy), 1); + gsm0503_tch_fr_encode(*bursts_p, tch_dummy_facch, sizeof(tch_dummy_facch), 1); + chan_state->dl_facch_bursts = 8; goto send_burst; }
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c index 4b021f9..3304321 100644 --- a/src/osmo-bts-trx/sched_lchan_tchh.c +++ b/src/osmo-bts-trx/sched_lchan_tchh.c @@ -369,14 +369,10 @@
/* no message at all, send a dummy L2 frame on FACCH */ if (msg == NULL && !chan_state->dl_ongoing_facch) { - static const uint8_t dummy[GSM_MACBLOCK_LEN] = { - 0x03, 0x03, 0x01, /* TODO: use randomized padding */ - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - }; - LOGL1SB(DL1P, LOGL_INFO, l1ts, br, "No TCH or FACCH prim for transmit.\n"); - gsm0503_tch_hr_encode(*bursts_p, dummy, sizeof(dummy)); + gsm0503_tch_hr_encode(*bursts_p, tch_dummy_facch, sizeof(tch_dummy_facch)); + chan_state->dl_ongoing_facch = 1; + chan_state->dl_facch_bursts = 6; goto send_burst; }
diff --git a/src/osmo-bts-trx/sched_tch.h b/src/osmo-bts-trx/sched_tch.h index e77e05d..5a7462b 100644 --- a/src/osmo-bts-trx/sched_tch.h +++ b/src/osmo-bts-trx/sched_tch.h @@ -23,6 +23,12 @@
#pragma once
+static const uint8_t tch_dummy_facch[GSM_MACBLOCK_LEN] = { + 0x03, 0x03, 0x01, /* TODO: use randomized padding */ + 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, + 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, +}; + void trx_loop_amr_set(struct l1sched_chan_state *chan_state, int loop);
/* Populate the given buffer with a BFI payload */