aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-trx/trx_if.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-02-22 07:52:51 +0100
committerHarald Welte <laforge@gnumonks.org>2015-09-22 16:41:27 +0200
commit889890da4312916bd617b3c95326a89237078a3b (patch)
treea767ad6e8d80629f415e74f1ce000dec7956e655 /src/osmo-bts-trx/trx_if.c
parent23a5183767d96a723190634f4a26d018492880bf (diff)
TRX: Improved handling of clock indications.
If no clock is received, a POWEROFF is sent until clock is detected.
Diffstat (limited to 'src/osmo-bts-trx/trx_if.c')
-rw-r--r--src/osmo-bts-trx/trx_if.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index c03427a0..6420fdb4 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -183,7 +183,7 @@ static int trx_ctrl_cmd(struct trx_l1h *l1h, int critical, const char *cmd,
va_list ap;
int l, pending = 0;
- if (!tranceiver_available) {
+ if (!tranceiver_available && !!strcmp(cmd, "POWEROFF")) {
LOGP(DTRX, LOGL_ERROR, "CTRL ignored: No clock from "
"tranceiver, please fix!\n");
return -EIO;
@@ -474,6 +474,9 @@ int trx_if_open(struct trx_l1h *l1h)
/* enable all slots */
l1h->config.slotmask = 0xff;
+ if (l1h->trx->nr == 0)
+ trx_if_cmd_poweroff(l1h);
+
return 0;
err: