diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-02-21 15:41:41 +0100 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2014-04-06 08:57:22 +0200 |
commit | c163b4fa13deff43492ee61b3f1b0b60eb83aef0 (patch) | |
tree | d73861a67b8b1a72d01d68c1b3b111ad09b707da | |
parent | da92e55351c6a355d8f7aa8e00498d5dd536eb51 (diff) |
TRX: Fixes to TRX interface
Ignore false response to uncritical commands.
-rw-r--r-- | src/osmo-bts-trx/trx_if.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index b8535e38..c03427a0 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -305,7 +305,7 @@ static int trx_ctrl_read_cb(struct osmo_fd *ofd, unsigned int what) else rsp_len = strlen(buf) - 4; - LOGP(DTRX, LOGL_DEBUG, "Response message: '%s'\n", buf); + LOGP(DTRX, LOGL_INFO, "Response message: '%s'\n", buf); /* abort timer and send next message, if any */ if (osmo_timer_pending(&l1h->trx_ctrl_timer)) @@ -323,10 +323,10 @@ static int trx_ctrl_read_cb(struct osmo_fd *ofd, unsigned int what) /* check if respose matches command */ if (rsp_len != tcm->cmd_len) { notmatch: - LOGP(DTRX, LOGL_NOTICE, "Response message '%s' does " - "not match command message '%s'\n", buf, - tcm->cmd); - return -EINVAL; + LOGP(DTRX, (tcm->critical) ? LOGL_FATAL : LOGL_NOTICE, + "Response message '%s' does not match command " + "message '%s'\n", buf, tcm->cmd); + goto rsp_error; } if (!!strncmp(buf + 4, tcm->cmd + 4, rsp_len)) goto notmatch; @@ -337,6 +337,7 @@ static int trx_ctrl_read_cb(struct osmo_fd *ofd, unsigned int what) LOGP(DTRX, (tcm->critical) ? LOGL_FATAL : LOGL_NOTICE, "Tranceiver rejected TRX command with " "response: '%s'\n", buf); +rsp_error: if (tcm->critical) { bts_shutdown(l1h->trx->bts, "SIGINT"); /* keep tcm list, so process is stopped */ @@ -403,7 +404,7 @@ static int trx_data_read_cb(struct osmo_fd *ofd, unsigned int what) return -EINVAL; } - LOGP(DTRX, LOGL_DEBUG, "RX burst tn=%u fn=%u rssi=%d toa=%.2f ", + LOGP(DTRX, LOGL_DEBUG, "RX burst tn=%u fn=%u rssi=%d toa=%.2f\n", tn, fn, rssi, toa); trx_sched_ul_burst(l1h, tn, fn, bits, rssi, toa); |