Change in osmo-bts[master]: Do not depend on pcu_direct flag when populating ph_data_ind

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
Mon Feb 17 11:40:30 UTC 2020


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17197 )


Change subject: Do not depend on pcu_direct flag when populating ph_data_ind
......................................................................

Do not depend on pcu_direct flag when populating ph_data_ind

The struct members ber10k, ta_offs_256bits and lqual_cb in ph_data_ind
are only populated when the pcu_direct flag is not set.

The pcu_direct flag is set when the pcu is directly attached to the phy
and all pcu related traffic (pdtch) is handled without sending it through
osmo-bts-sysmo. For those cases osmo_bts_sysmo will not make use of
those struct members, even if they were populated. When the PCU is not
directly attached the data is needed because it is sent through the
pcu_sock to the PCU.

Lets remove the check because it is not required. Also in future patches
where measurement indications and data / tch indicatins are merged the
struct members are also needed to carry the measurement information for
SACCH as well.

Change-Id: Iaa37bb62af4f5eb4b6e684cb754e68d11e6fd676
---
M src/osmo-bts-litecell15/l1_if.c
M src/osmo-bts-oc2g/l1_if.c
M src/osmo-bts-sysmo/l1_if.c
3 files changed, 12 insertions(+), 15 deletions(-)



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

diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index 989cc10..abf48bc 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -1024,11 +1024,10 @@
 	l1sap->u.data.chan_nr = chan_nr;
 	l1sap->u.data.fn = fn;
 	l1sap->u.data.rssi = rssi;
-	if (!pcu_direct) {
-		l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000;
-		l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming*64;
-		l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10;
-	}
+	l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000;
+	l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming*64;
+	l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10;
+
 	return l1sap_up(trx, l1sap);
 }
 
diff --git a/src/osmo-bts-oc2g/l1_if.c b/src/osmo-bts-oc2g/l1_if.c
index 9816979..b46c528 100644
--- a/src/osmo-bts-oc2g/l1_if.c
+++ b/src/osmo-bts-oc2g/l1_if.c
@@ -1081,11 +1081,10 @@
 	l1sap->u.data.chan_nr = chan_nr;
 	l1sap->u.data.fn = fn;
 	l1sap->u.data.rssi = rssi;
-	if (!pcu_direct) {
-		l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000;
-		l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming*64;
-		l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10;
-	}
+	l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000;
+	l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming*64;
+	l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10;
+
 	return l1sap_up(trx, l1sap);
 }
 
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index db0dfb5..a891f48 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1010,11 +1010,10 @@
 	l1sap->u.data.chan_nr = chan_nr;
 	l1sap->u.data.fn = fn;
 	l1sap->u.data.rssi = (int8_t) (data_ind->measParam.fRssi);
-	if (!pcu_direct) { /* FIXME: if pcu_direct=1, then this is not set, what to do in pcu_tx_data_ind() in this case ?*/
-		l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000;
-		l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming * 64;
-		l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10;
-	}
+	l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000;
+	l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming * 64;
+	l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10;
+
 	/* copy data from L1 primitive to L1SAP primitive */
 	sap_msg->l2h = msgb_put(sap_msg, data_ind->msgUnitParam.u8Size);
 	memcpy(sap_msg->l2h, data_ind->msgUnitParam.u8Buffer,

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17197
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Iaa37bb62af4f5eb4b6e684cb754e68d11e6fd676
Gerrit-Change-Number: 17197
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200217/0a2d3738/attachment.htm>


More information about the gerrit-log mailing list