fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmocom-bb/+/43829?usp=email )
Change subject: trxcon/trx_if: negotiate TRXD PDU version 1 (TRXDv1)
......................................................................
trxcon/trx_if: negotiate TRXD PDU version 1 (TRXDv1)
Now that trx_if.c is built against libosmo-trx, enable TRXDv1 by
negotiating it (SETFORMAT) before every POWERON, since the transceiver
may reset its active format back to legacy on the preceding POWEROFF.
This significantly improves the ttcn3-bts-test pass/fail ratio in the
frequency hopping configuration: TRXDv1 lets the transceiver
(osmo-trx-proxy) send us NOPE.ind, which we rely on to keep driving
uplink bursts even when no downlink burst was received.
Change-Id: I08d588f74925bb7a85e131defc0fa82158d90680
Related: OS#6638
---
M src/host/trxcon/src/trx_if.c
1 file changed, 32 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/29/43829/1
diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c
index 761223d..e1cd4a2 100644
--- a/src/host/trxcon/src/trx_if.c
+++ b/src/host/trxcon/src/trx_if.c
@@ -45,6 +45,9 @@
#include <osmocom/bb/trxcon/trx_if.h>
#include <osmocom/bb/trxcon/logging.h>
+/* Highest TRXD PDU version supported by trxcon */
+#define TRXD_PDU_VER_MAX 1
+
/* Give up after 3 retransmissions of a TRXC command */
#define TRX_MAX_RETRANS 3
@@ -148,6 +151,15 @@
return osmo_trxc_client_poweron(trx->trxc_client, &trx_poweron_rsp_cb,
trx);
}
+static void trx_setformat_cb(struct osmo_trxc_client *client,
+ uint8_t ver_use, void *cb_data)
+{
+ struct trx_instance *trx = cb_data;
+
+ LOGPFSML(trx->fi, LOGL_INFO, "Using TRXD PDU version %u\n", ver_use);
+ osmo_trx_ep_set_pdu_ver(trx->ep, 0, ver_use);
+}
+
static int trx_if_cmd_setslot(struct trx_instance *trx,
const struct trxcon_phyif_cmdp_setslot *cmdp)
{
@@ -398,8 +410,11 @@
}
}
-/* No state change here: the POWERON response (see trx_poweron_rsp_cb())
- * is what moves us to TRX_ST_POWERON. */
+/* (Re-)negotiate the TRXD PDU format and send POWERON right behind it,
+ * since the transceiver may have reset its active format back to legacy
+ * on the preceding POWEROFF (or never negotiated it at all, if this is the
+ * very first POWERON). No state change here: the POWERON response (see
+ * trx_poweron_rsp_cb()) is what moves us to TRX_ST_POWERON. */
static void trx_fsm_handle_poweron_req(struct osmo_fsm_inst *fi)
{
struct trx_instance *trx = fi->priv;
@@ -409,6 +424,9 @@
return;
}
+ osmo_trxc_client_negotiate_format(trx->trxc_client,
+ TRXD_PDU_VER_MAX,
+ &trx_setformat_cb, trx);
trx_if_cmd_poweron(trx);
}
@@ -481,16 +499,19 @@
LOGPFSMSL(trx->fi, DTRXD, LOGL_DEBUG, "Rx %s\n",
osmo_trxd_burst_ind_name(bi));
- const struct trxcon_phyif_burst_ind phybi = {
- .fn = bi->fn,
- .tn = bi->tn,
- .toa256 = bi->toa256,
- .rssi = bi->rssi,
- .burst = &bi->burst[0],
- .burst_len = bi->burst_len,
- };
+ /* XXX: l1sched does not support NOPE.ind */
+ if (~bi->flags & OSMO_TRXD_F_NOPE_IND) {
+ const struct trxcon_phyif_burst_ind phybi = {
+ .fn = bi->fn,
+ .tn = bi->tn,
+ .toa256 = bi->toa256,
+ .rssi = bi->rssi,
+ .burst = &bi->burst[0],
+ .burst_len = bi->burst_len,
+ };
- trxcon_phyif_handle_burst_ind(trx->priv, &phybi);
+ trxcon_phyif_handle_burst_ind(trx->priv, &phybi);
+ }
const struct trxcon_phyif_rts_ind rts = {
.fn = GSM_TDMA_FN_SUM(bi->fn, trx->fn_advance),
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/43829?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I08d588f74925bb7a85e131defc0fa82158d90680
Gerrit-Change-Number: 43829
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>