[PATCH] osmo-bts[master]: octphy: reintroducing multi-trx support

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/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Wed Oct 5 12:18:01 UTC 2016


Review at  https://gerrit.osmocom.org/1009

octphy: reintroducing multi-trx support

The multi-trx had to be removed because of build conflicts
with octphy header that lack the struct members for needed
to support multi-trx.

For details see the following revert-commits:
ed6b48e4a5fba07c3ecccf689991799ae13a2aaa
c9a1f284acf518cb4e62c3898e20398ed53807c3

This commit reintroduces multi trx support and ads an ifdef
decision to ensure that header files without multi-trx
support still work.

Change-Id: I7f9b2906cc149c817183745b4c96bcc7f9ebdad0
---
M configure.ac
M include/osmo-bts/phy_link.h
M src/osmo-bts-octphy/l1_oml.c
3 files changed, 22 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/09/1009/1

diff --git a/configure.ac b/configure.ac
index d35a52a..7ba056e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,7 @@
 AC_MSG_RESULT([$enable_octphy])
 AM_CONDITIONAL(ENABLE_OCTPHY, test "x$enable_octphy" = "xyes")
 if test "$enable_octphy" = "yes" ; then
+	AC_CHECK_MEMBER([tOCTVC1_GSM_TRX_CONFIG.usCentreArfcn], [define 'OCTPHY_MULTI_TRX'],[],[[#include <octphy/octvc1/gsm/octvc1_gsm_api.h>]])
 	oldCPPFLAGS=$CPPFLAGS
 	CPPFLAGS="$CPPFLAGS -I$OCTSDR2G_INCDIR -I$srcdir/include $LIBOSMOCORE_CFLAGS"
 	AC_CHECK_HEADER([octphy/octvc1/gsm/octvc1_gsm_default.h],[],
diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h
index 7c09b2d..2db3c51 100644
--- a/include/osmo-bts/phy_link.h
+++ b/include/osmo-bts/phy_link.h
@@ -64,6 +64,10 @@
 			uint32_t rx_gain_db;
 			uint32_t tx_atten_flag;
 			uint32_t tx_atten_db;
+#ifdef OCTPHY_MULTI_TRX
+			/* arfcn used by TRX with id 0 */
+			uint16_t center_arfcn;
+#endif
 
 			struct octphy_hdl *hdl;
 		} octphy;
diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c
index e543c15..bb4dad3 100644
--- a/src/osmo-bts-octphy/l1_oml.c
+++ b/src/osmo-bts-octphy/l1_oml.c
@@ -1347,8 +1347,16 @@
 	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.usTsc = trx->bts->bsic & 0x7;
+#ifdef OCTPHY_MULTI_TRX
+	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.usBcchArfcn = trx->bts->c0->arfcn;
+#endif
+	oc->Config.usTsc = trx->bts->bsic & 0x7;
 	oc->RfConfig.ulRxGainDb = plink->u.octphy.rx_gain_db;
 	/* FIXME: compute this based on nominal transmit power, etc. */
 	if (plink->u.octphy.tx_atten_flag == 1) {
@@ -1360,11 +1368,19 @@
 		oc->RfConfig.ulTxAttndB = (trx->max_power_red) << 2;
 	}
 
+#ifdef OCTPHY_MULTI_TRX
+	LOGP(DL1C, LOGL_INFO, "Tx TRX-OPEN.req(trx=%u, rf_port=%u, arfcn=%u, "
+		"center=%u, tsc=%u, rx_gain=%u, tx_atten=%u)\n",
+		oc->TrxId.byTrxId, oc->ulRfPortIndex, oc->Config.usArfcn,
+		oc->Config.usCentreArfcn, oc->Config.usTsc, oc->RfConfig.ulRxGainDb,
+		oc->RfConfig.ulTxAttndB);
+#else
 	LOGP(DL1C, LOGL_INFO, "Tx TRX-OPEN.req(trx=%u, rf_port=%u, arfcn=%u, "
 		"tsc=%u, rx_gain=%u, tx_atten=%u)\n",
 		oc->TrxId.byTrxId, oc->ulRfPortIndex, oc->Config.usArfcn,
 		oc->Config.usTsc, oc->RfConfig.ulRxGainDb,
 		oc->RfConfig.ulTxAttndB);
+#endif
 
 	mOCTVC1_GSM_MSG_TRX_OPEN_CMD_SWAP(oc);
 

-- 
To view, visit https://gerrit.osmocom.org/1009
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f9b2906cc149c817183745b4c96bcc7f9ebdad0
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list