aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-oc2g
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-11-12 12:50:23 +0100
committerHarald Welte <laforge@gnumonks.org>2018-11-18 20:29:40 +0000
commiteebb6a4216f136132400831ca35ed70e7502e92a (patch)
tree0b987086e93e19d08360cd4d647af4f15d11688f /src/osmo-bts-oc2g
parente5f4654ee34c5a346a0b85805c706115464e96e1 (diff)
bts: Allocate TRX for BTS dynamically, deprecate -t
No need to pass -t num_trx anymore to specify number of TRX to use. It is calculated based on dynamic allocation from VTY config. Using parameter -t is flagged as deprecated and is transformed into a NOOP por backward compatibility. As a result, TRX now are allocated after the BTS is allocated and initial config (pre-VTY) is applied. A new function bts_trx_init() is added, to set default config on each TRX during allocation and before setting VTY config on it. A new per BTS model function bts_model_trx_init() is added, to allow per model specific default configuration of each TRX. Change-Id: Iab1a754ab12a626759f9f90aa66f87bdce65ac9c
Diffstat (limited to 'src/osmo-bts-oc2g')
-rw-r--r--src/osmo-bts-oc2g/main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/osmo-bts-oc2g/main.c b/src/osmo-bts-oc2g/main.c
index 9777c092..574bc723 100644
--- a/src/osmo-bts-oc2g/main.c
+++ b/src/osmo-bts-oc2g/main.c
@@ -105,11 +105,6 @@ int bts_model_init(struct gsm_bts *bts)
exit(1);
}
- llist_for_each_entry(trx, &bts->trx_list, list) {
- trx->nominal_power = 40;
- trx->power_params.trx_p_max_out_mdBm = to_mdB(bts->c0->nominal_power);
- }
-
if (stat(OC2GBTS_RF_LOCK_PATH, &st) == 0) {
LOGP(DL1C, LOGL_NOTICE, "Not starting BTS due to RF_LOCK file present\n");
exit(23);
@@ -130,6 +125,13 @@ int bts_model_init(struct gsm_bts *bts)
return 0;
}
+int bts_model_trx_init(struct gsm_bts_trx *trx)
+{
+ trx->nominal_power = 40;
+ trx->power_params.trx_p_max_out_mdBm = to_mdB(trx->bts->c0->nominal_power);
+ return 0;
+}
+
void bts_model_phy_link_set_defaults(struct phy_link *plink)
{
}