[PATCH] octphy: fix for multiple trx with more than 1 dsp

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

msuraev at sysmocom.de msuraev at sysmocom.de
Mon Mar 21 14:39:02 UTC 2016


From: Max <msuraev at sysmocom.de>

Explicitly store and use "center" arfcn used by each dsp (1 dsp
corresponds to 1 phy link).
---
 include/osmo-bts/phy_link.h  | 3 ++-
 src/osmo-bts-octphy/l1_oml.c | 9 ++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h
index e31971e..a559aa3 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 bdf39bf..14181dc 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;
-- 
2.7.4




More information about the OpenBSC mailing list