summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-08-19 12:28:39 +0600
committerVadim Yanitskiy <axilirator@gmail.com>2017-10-23 22:05:49 +0330
commitdedf3e42d3dd6e239a0586778996816f9f0b0fd9 (patch)
treebd738eaa00ace168961494dfa8bace21a459383c
parent71c7b4622ff844e0cf9eddc16472e18f06c92a26 (diff)
host/trxcon/trx_if.c: separate logging of data messages
-rw-r--r--src/host/trxcon/logging.c8
-rw-r--r--src/host/trxcon/logging.h3
-rw-r--r--src/host/trxcon/trx_if.c14
3 files changed, 16 insertions, 9 deletions
diff --git a/src/host/trxcon/logging.c b/src/host/trxcon/logging.c
index 338deaf8..119456b6 100644
--- a/src/host/trxcon/logging.c
+++ b/src/host/trxcon/logging.c
@@ -48,7 +48,13 @@ static struct log_info_cat trx_log_info_cat[] = {
},
[DTRX] = {
.name = "DTRX",
- .description = "Transceiver interface",
+ .description = "Transceiver control interface",
+ .color = "\033[1;33m",
+ .enabled = 1, .loglevel = LOGL_NOTICE,
+ },
+ [DTRXD] = {
+ .name = "DTRXD",
+ .description = "Transceiver data interface",
.color = "\033[1;33m",
.enabled = 1, .loglevel = LOGL_NOTICE,
},
diff --git a/src/host/trxcon/logging.h b/src/host/trxcon/logging.h
index 22f32517..6221c55e 100644
--- a/src/host/trxcon/logging.h
+++ b/src/host/trxcon/logging.h
@@ -2,13 +2,14 @@
#include <osmocom/core/logging.h>
-#define DEBUG_DEFAULT "DAPP:DL1C:DL1D:DTRX:DSCH"
+#define DEBUG_DEFAULT "DAPP:DL1C:DL1D:DTRX:DTRXD:DSCH"
enum {
DAPP,
DL1C,
DL1D,
DTRX,
+ DTRXD,
DSCH,
};
diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c
index 368c4742..6a84af62 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -545,8 +545,8 @@ static int trx_data_rx_cb(struct osmo_fd *ofd, unsigned int what)
return len;
if (len != 158) {
- LOGP(DTRX, LOGL_ERROR, "Got data message with invalid length "
- "'%d'\n", len);
+ LOGP(DTRXD, LOGL_ERROR, "Got data message with invalid "
+ "length '%d'\n", len);
return -EINVAL;
}
@@ -564,16 +564,16 @@ static int trx_data_rx_cb(struct osmo_fd *ofd, unsigned int what)
}
if (tn >= 8) {
- LOGP(DTRX, LOGL_ERROR, "Illegal TS %d\n", tn);
+ LOGP(DTRXD, LOGL_ERROR, "Illegal TS %d\n", tn);
return -EINVAL;
}
if (fn >= 2715648) {
- LOGP(DTRX, LOGL_ERROR, "Illegal FN %u\n", fn);
+ LOGP(DTRXD, LOGL_ERROR, "Illegal FN %u\n", fn);
return -EINVAL;
}
- LOGP(DTRX, LOGL_DEBUG, "RX burst tn=%u fn=%u rssi=%d toa=%.2f\n",
+ LOGP(DTRXD, LOGL_DEBUG, "RX burst tn=%u fn=%u rssi=%d toa=%.2f\n",
tn, fn, rssi, toa);
/* Poke scheduler */
@@ -598,12 +598,12 @@ int trx_if_tx_burst(struct trx_instance *trx, uint8_t tn, uint32_t fn,
* TODO: should we wait in TRX_STATE_RSP_WAIT state?
*/
if (trx->fsm->state != TRX_STATE_ACTIVE) {
- LOGP(DTRX, LOGL_DEBUG, "Ignoring TX data, "
+ LOGP(DTRXD, LOGL_DEBUG, "Ignoring TX data, "
"transceiver isn't ready\n");
return -EAGAIN;
}
- LOGP(DTRX, LOGL_DEBUG, "TX burst tn=%u fn=%u pwr=%u\n", tn, fn, pwr);
+ LOGP(DTRXD, LOGL_DEBUG, "TX burst tn=%u fn=%u pwr=%u\n", tn, fn, pwr);
buf[0] = tn;
buf[1] = (fn >> 24) & 0xff;