aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/utils.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-10-05 18:10:09 +0200
committerHarald Welte <laforge@gnumonks.org>2013-10-09 15:38:33 +0200
commit50e63fa9e7e89b4966007d90d29b0e5ba88d988d (patch)
tree07278795aa5b76d96f61d6e6e2fd6da1209e4b75 /src/osmo-bts-sysmo/utils.c
parent19009f2d7ae805ca8037747934cb9c76f533022c (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/utils.c')
-rw-r--r--src/osmo-bts-sysmo/utils.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/utils.c b/src/osmo-bts-sysmo/utils.c
index eaa45290..50898453 100644
--- a/src/osmo-bts-sysmo/utils.c
+++ b/src/osmo-bts-sysmo/utils.c
@@ -95,3 +95,23 @@ int sysmobts_select_femto_band(struct gsm_bts_trx *trx, uint16_t arfcn)
/* give up */
return -1;
}
+
+int sysmobts_get_nominal_power(struct gsm_bts_trx *trx)
+{
+ struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx);
+
+ switch (fl1h->hw_info.model_nr) {
+ case 0:
+ case 0xffff:
+ /* old units have empty flash where the model number is
+ * stored in later units */
+ case 1002:
+ /* 200mW (23 dBm) nominal power */
+ return 23;
+ case 2050:
+ /* 5W(39dBm) per TRX. This could be raiesd to 10W(40dBm)
+ * if the second TRX is not used. */
+ return 37;
+ }
+ return -1;
+}