aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-trx/trx_if.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-06-15 17:55:21 +0200
committerHarald Welte <laforge@gnumonks.org>2016-06-16 13:39:42 +0000
commitecd5bc2aefe8611795229980105de2f0bc4e092a (patch)
tree7c937185188fae930f865eb1198e72eedbef8ab6 /src/osmo-bts-trx/trx_if.c
parent7cc3c3156ef23500612724f8a38c3db95c05702b (diff)
TRX: Add vty command to power on/off transceiver
Add vty command (under "phy X instance Y" hierarchy) to manually send POWERON or POWEROFF command. It's useful for debugging issues related to BTS/TRX initialization. Change-Id: I6dfebaf118cdf5ad144516b2b839b17350a73ce4 Related: OS#1648
Diffstat (limited to 'src/osmo-bts-trx/trx_if.c')
-rw-r--r--src/osmo-bts-trx/trx_if.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index c448006e..04d8fea6 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -195,9 +195,10 @@ static int trx_ctrl_cmd(struct trx_l1h *l1h, int critical, const char *cmd,
va_list ap;
int l, pending = 0;
- if (!transceiver_available && !!strcmp(cmd, "POWEROFF")) {
- LOGP(DTRX, LOGL_ERROR, "CTRL ignored: No clock from "
- "transceiver, please fix!\n");
+ if (!transceiver_available &&
+ !(!strcmp(cmd, "POWEROFF") || !strcmp(cmd, "POWERON"))) {
+ LOGP(DTRX, LOGL_ERROR, "CTRL %s ignored: No clock from "
+ "transceiver, please fix!\n", cmd);
return -EIO;
}