diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-04-07 12:49:52 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2015-09-22 16:41:28 +0200 |
commit | 2e4a26a0e942e227a96819271ea0ea2b03566928 (patch) | |
tree | 12a730c8949e23ada7ff916258c911bd16bb1602 /src/osmo-bts-trx/trx_if.c | |
parent | 6508f2113042d1fbd1cb6d7154c7701422f6b7c9 (diff) |
TRX: Add VTY options to enable and disable SETTSC and SETBSIC
Diffstat (limited to 'src/osmo-bts-trx/trx_if.c')
-rw-r--r-- | src/osmo-bts-trx/trx_if.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index bca9cdca..e6b70134 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -46,6 +46,8 @@ int tranceiver_available = 0; const char *tranceiver_ip = "127.0.0.1"; +int settsc_enabled = 0; +int setbsic_enabled = 0; /* * socket @@ -230,12 +232,20 @@ int trx_if_cmd_poweron(struct trx_l1h *l1h) int trx_if_cmd_settsc(struct trx_l1h *l1h, uint8_t tsc) { - return trx_ctrl_cmd(l1h, 0, "SETTSC", "%d", tsc); + if (!settsc_enabled) + return 0; + /* if TSC is enabled only, the positive response is mandatory */ + return trx_ctrl_cmd(l1h, (setbsic_enabled) ? 0 : 1, "SETTSC", "%d", + tsc); } int trx_if_cmd_setbsic(struct trx_l1h *l1h, uint8_t bsic) { - return trx_ctrl_cmd(l1h, 0, "SETBSIC", "%d", bsic); + if (!setbsic_enabled) + return 0; + /* if BSIC is enabled only, the positive response is mandatory */ + return trx_ctrl_cmd(l1h, (settsc_enabled) ? 0 : 1, "SETBSIC", "%d", + bsic); } int trx_if_cmd_setrxgain(struct trx_l1h *l1h, int db) |