aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo-bts-sysmo/utils.c')
-rw-r--r--src/osmo-bts-sysmo/utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/utils.c b/src/osmo-bts-sysmo/utils.c
index f576eef5..af1e5d29 100644
--- a/src/osmo-bts-sysmo/utils.c
+++ b/src/osmo-bts-sysmo/utils.c
@@ -136,3 +136,14 @@ int sysmobts_get_nominal_power(struct gsm_bts_trx *trx)
}
return -1;
}
+
+int sysmobts_get_power_trx(struct gsm_bts_trx *trx)
+{
+ int power_transmitter = trx->nominal_power - trx->max_power_red;
+ power_transmitter -= trx->power_reduce;
+
+ if (power_transmitter < 0)
+ power_transmitter = 0;
+
+ return power_transmitter;
+}