diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-07-24 01:31:17 +0700 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-07-25 19:53:51 +0700 |
commit | 4f2d6c40d000f401ffaabe16202f541c4658564a (patch) | |
tree | c79a6411b28ea58976e06c613238450be8f3bc43 | |
parent | a986c466f0e6c0083d00f65cce8d6fcd3134b807 (diff) |
trxcon: ensure TRXD logging is actually using LOGPFSMSL()
This should have been done in [1], but somehow I forgot about TRXD.
Change-Id: Ia5124061fe391644267a6117ac2627cad7adf873
Fixes: [1] Ic253903e7b8635bb13e210acfe929c73f8870632
Related: OS#5599
-rw-r--r-- | src/host/trxcon/src/trx_if.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c index 7daedad6..7499740f 100644 --- a/src/host/trxcon/src/trx_if.c +++ b/src/host/trxcon/src/trx_if.c @@ -601,13 +601,13 @@ static int trx_data_rx_cb(struct osmo_fd *ofd, unsigned int what) read_len = read(ofd->fd, buf, sizeof(buf)); if (read_len <= 0) { - LOGP(DTRXD, LOGL_ERROR, "read() failed with rc=%zd\n", read_len); + LOGPFSMSL(trx->fi, DTRXD, LOGL_ERROR, "read() failed with rc=%zd\n", read_len); return read_len; } if (read_len < (8 + 148)) { /* TRXDv0 header + GMSK burst */ - LOGP(DTRXD, LOGL_ERROR, "Got data message with invalid " - "length '%zd'\n", read_len); + LOGPFSMSL(trx->fi, DTRXD, LOGL_ERROR, + "Got data message with invalid length '%zd'\n", read_len); return -EINVAL; } @@ -620,17 +620,18 @@ static int trx_data_rx_cb(struct osmo_fd *ofd, unsigned int what) osmo_ubit2sbit(bits, buf + 8, 148); if (tn >= 8) { - LOGP(DTRXD, LOGL_ERROR, "Illegal TS %d\n", tn); + LOGPFSMSL(trx->fi, DTRXD, LOGL_ERROR, "Illegal TS %d\n", tn); return -EINVAL; } if (fn >= 2715648) { - LOGP(DTRXD, LOGL_ERROR, "Illegal FN %u\n", fn); + LOGPFSMSL(trx->fi, DTRXD, LOGL_ERROR, "Illegal FN %u\n", fn); return -EINVAL; } - LOGP(DTRXD, LOGL_DEBUG, "RX burst tn=%u fn=%u rssi=%d toa=%d\n", - tn, fn, rssi, toa256); + LOGPFSMSL(trx->fi, DTRXD, LOGL_DEBUG, + "RX burst tn=%u fn=%u rssi=%d toa=%d\n", + tn, fn, rssi, toa256); /* Group the measurements together */ meas = (struct l1sched_meas_set) { @@ -664,14 +665,15 @@ int trx_if_tx_burst(struct trx_instance *trx, */ #if 0 if (trx->fi->state != TRX_STATE_ACTIVE) { - LOGP(DTRXD, LOGL_ERROR, "Ignoring TX data, " - "transceiver isn't ready\n"); + LOGPFSMSL(trx->fi, DTRXD, LOGL_ERROR, + "Ignoring TX data, transceiver isn't ready\n"); return -EAGAIN; } #endif - LOGP(DTRXD, LOGL_DEBUG, "TX burst tn=%u fn=%u pwr=%u\n", - br->tn, br->fn, br->pwr); + LOGPFSMSL(trx->fi, DTRXD, LOGL_DEBUG, + "TX burst tn=%u fn=%u pwr=%u\n", + br->tn, br->fn, br->pwr); buf[0] = br->tn; osmo_store32be(br->fn, buf + 1); |