aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2020-02-17 11:58:21 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2020-02-17 12:11:43 +0100
commitac61baed2e8acc5faef57ee37f0d125eadd7f8ee (patch)
treee31295b69cb24a6b7764f7580af70d23830ccb30
parentaea29c72493ba66d7a41110d75adb8c71ae0e313 (diff)
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
-rw-r--r--src/osmo-bts-litecell15/l1_if.c9
-rw-r--r--src/osmo-bts-oc2g/l1_if.c9
-rw-r--r--src/osmo-bts-sysmo/l1_if.c9
3 files changed, 12 insertions, 15 deletions
diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index 989cc10a..abf48bcd 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -1024,11 +1024,10 @@ static int handle_ph_data_ind(struct lc15l1_hdl *fl1, GsmL1_PhDataInd_t *data_in
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 9816979f..b46c528a 100644
--- a/src/osmo-bts-oc2g/l1_if.c
+++ b/src/osmo-bts-oc2g/l1_if.c
@@ -1081,11 +1081,10 @@ static int handle_ph_data_ind(struct oc2gl1_hdl *fl1, GsmL1_PhDataInd_t *data_in
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 db0dfb56..a891f48f 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1010,11 +1010,10 @@ static int handle_ph_data_ind(struct femtol1_hdl *fl1, GsmL1_PhDataInd_t *data_i
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,