aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-03-21 15:39:02 +0100
committerHarald Welte <laforge@gnumonks.org>2016-03-21 17:20:11 +0100
commit06968beab90806cba94c8b331276e4dc209c152b (patch)
tree44fe28fd13b7c6fc3c646bdd8ec2ff821a00bd20
parentae5a737c18aebfdc2e1cb66787b070a11eb20772 (diff)
octphy: fix for multiple trx with more than 1 dsp
Explicitly store and use "center" arfcn used by each dsp (1 dsp corresponds to 1 phy link).
-rw-r--r--include/osmo-bts/phy_link.h3
-rw-r--r--src/osmo-bts-octphy/l1_oml.c9
2 files changed, 10 insertions, 2 deletions
diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h
index e31971e6..a559aa3e 100644
--- a/include/osmo-bts/phy_link.h
+++ b/include/osmo-bts/phy_link.h
@@ -62,7 +62,8 @@ struct phy_link {
uint32_t rf_port_index;
uint32_t rx_gain_db;
uint32_t tx_atten_db;
-
+ /* arfcn used by TRX with id 0 */
+ uint16_t center_arfcn;
struct octphy_hdl *hdl;
} octphy;
} u;
diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c
index bdf39bfe..14181dc4 100644
--- a/src/osmo-bts-octphy/l1_oml.c
+++ b/src/osmo-bts-octphy/l1_oml.c
@@ -1304,7 +1304,14 @@ int l1if_trx_open(struct gsm_bts_trx *trx)
oc->TrxId.byTrxId = pinst->u.octphy.trx_id;
oc->Config.ulBand = osmocom_to_octphy_band(trx->bts->band, trx->arfcn);
oc->Config.usArfcn = trx->arfcn;
- oc->Config.usCentreArfcn = trx->bts->c0->arfcn;
+
+ if (pinst->u.octphy.trx_id)
+ oc->Config.usCentreArfcn = plink->u.octphy.center_arfcn;
+ else {
+ oc->Config.usCentreArfcn = trx->arfcn;
+ plink->u.octphy.center_arfcn = trx->arfcn;
+ }
+
oc->Config.usTsc = trx->bts->bsic & 0x7;
oc->Config.usBcchArfcn = trx->bts->c0->arfcn;
oc->RfConfig.ulRxGainDb = plink->u.octphy.rx_gain_db;