fixeria has uploaded this change for review.

View Change

osmo-bts-trx: check if scheduling of [dummy] FACCH/H is allowed

Change-Id: I6f8af140a6ccf3d5fd7b98f6cb5c18e2c5e2f61b
Related: SYS#5919, OS#4823
---
M src/common/scheduler.c
M src/osmo-bts-trx/sched_lchan_tchh.c
2 files changed, 9 insertions(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/36/27836/1
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 96189ef..422572d 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -998,7 +998,7 @@

/* FACCH/H channel mapping for Downlink (see 3GPP TS 45.002, table 1).
* This mapping is valid for both FACCH/H(0) and FACCH/H(1). */
-static const uint8_t sched_tchh_dl_facch_map[26] = {
+const uint8_t sched_tchh_dl_facch_map[26] = {
[4] = 1, /* FACCH/H(0): B0(4,6,8,10,13,15) */
[5] = 1, /* FACCH/H(1): B0(5,7,9,11,14,16) */
[13] = 1, /* FACCH/H(0): B1(13,15,17,19,21,23) */
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index e9e59e7..a163b31 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -75,6 +75,9 @@
[3] = 1, /* FACCH/H(1): B2(18,20,22,24,1,3) */
};

+/* TDMA frame number of burst 'a' is used as the table index. */
+extern const uint8_t sched_tchh_dl_facch_map[26];
+
/*! \brief a single TCH/H burst was received by the PHY, process it */
int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
{
@@ -406,6 +409,11 @@
};

LOGL1SB(DL1P, LOGL_INFO, l1ts, br, "No TCH or FACCH prim for transmit.\n");
+
+ /* FACCH/H can only be scheduled at specific TDMA offset */
+ if (!sched_tchh_dl_facch_map[br->fn % 26])
+ goto send_burst; /* send garbage */
+
gsm0503_tch_hr_encode(*bursts_p, dummy, sizeof(dummy));
chan_state->dl_ongoing_facch = 1;
chan_state->dl_facch_bursts = 6;

To view, visit change 27836. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I6f8af140a6ccf3d5fd7b98f6cb5c18e2c5e2f61b
Gerrit-Change-Number: 27836
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-MessageType: newchange