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
This commit is contained in:
Philipp Maier 2020-02-17 11:58:21 +01:00
parent aea29c7249
commit ac61baed2e
3 changed files with 12 additions and 15 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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,