diff options
author | Harald Welte <laforge@gnumonks.org> | 2013-10-05 18:10:09 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2013-10-09 15:38:33 +0200 |
commit | 50e63fa9e7e89b4966007d90d29b0e5ba88d988d (patch) | |
tree | 07278795aa5b76d96f61d6e6e2fd6da1209e4b75 /src/osmo-bts-sysmo/main.c | |
parent | 19009f2d7ae805ca8037747934cb9c76f533022c (diff) |
sysmobts: Set nominal transmit power depending on sysmoBTS model
This enables the use of up to 5W for each TRX in a sysmoBTS 2050.
Diffstat (limited to 'src/osmo-bts-sysmo/main.c')
-rw-r--r-- | src/osmo-bts-sysmo/main.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index 15b1f1c0..9e89eb8a 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -48,6 +48,7 @@ #define SYSMOBTS_RF_LOCK_PATH "/var/lock/bts_rf_lock" +#include "utils.h" #include "eeprom.h" #include "l1_if.h" @@ -63,6 +64,7 @@ static int rt_prio = -1; int bts_model_init(struct gsm_bts *bts) { struct femtol1_hdl *fl1h; + int rc; fl1h = l1if_open(bts->c0); if (!fl1h) { @@ -72,7 +74,14 @@ int bts_model_init(struct gsm_bts *bts) fl1h->dsp_trace_f = dsp_trace; bts->c0->role_bts.l1h = fl1h; - bts->c0->nominal_power = 23; + + rc = sysmobts_get_nominal_power(bts->c0); + if (rc < 0) { + LOGP(DL1C, LOGL_FATAL, "Cannot determine nominal " + "ansmit power\n"); + return -EIO; + } + bts->c0->nominal_power = sysmobts_get_nominal_power(bts->c0); bts_model_vty_init(bts); |