diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-06-14 23:30:52 +0200 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-06-16 15:55:38 +0200 |
commit | f8bc28505f60e2a5636ad7779a13374ed661ad14 (patch) | |
tree | ea70a12eafdc2541c94518ccbaea00a1227494ae | |
parent | 529d54b13a308978188d0738e9979d35bee11031 (diff) |
trxcon/trx_if: send NOPE indications if there is no burst
In a typical setup operating on the real radio interface, it's
the duty of the transceiver (e.g. osmo-trx) to send NOPE.ind to
the L1 implementation (e.g. osmo-bts-trx). However, in a
virtual environment for ttcn3-bts-test we use a fake transceiver,
which due to its simplicity cannot send NOPE indications itself.
The lack of queues and buffering does not allow us to implement
NOPE indications in fake_trx.py, so the easiest approach is to
generate them from trxcon. Send TRXD PDUs without the burst bits,
and fake_trx.py will tranform them info NOPE.ind for us.
Change-Id: I1c7f1315b8ef44f651efd6a22fb5b854f65c0946
Related: SYS#5313, OS#1569
-rw-r--r-- | src/host/trxcon/trx_if.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index c4561cea..8dbbd128 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -635,9 +635,6 @@ int trx_if_tx_burst(struct trx_instance *trx, uint8_t buf[TRXD_BUF_SIZE]; size_t length; - if (br->burst_len == 0) - return 0; - /** * We must be sure that we have clock, * and we have sent all control data @@ -662,8 +659,10 @@ int trx_if_tx_burst(struct trx_instance *trx, length = 6; /* Copy ubits {0,1} */ - memcpy(buf + 6, br->burst, br->burst_len); - length += br->burst_len; + if (br->burst_len != 0) { + memcpy(buf + 6, br->burst, br->burst_len); + length += br->burst_len; + } /* Send data to transceiver */ send(trx->trx_ofd_data.fd, buf, length, 0); |