aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-02-18 17:48:07 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-02-22 13:57:54 +0100
commitcb20c83323da485ff392ccffa7ec75de8e2ffede (patch)
treeb264da57ab4287ef5c0f1ae6dc754f9b13b38728 /src/common
parent94bb3769f36c8b64c5dc196f02f22994543997d2 (diff)
Fix ocmo-bts-octphy interaction with OsmoPCU
Previously osmo-bts-octphy have not provided in-band presence information which cause off-by-one errors and misinterpretation of ph_data_ind by PCU. This fixed now by adding support for explicitly passing PH-DATA presence info. Corresponding check and in-band passing of presence information are removed. Note: this requires libosmocore version with osmo_ph_pres_info_type support integrated. [hfreyther/max: Remove + 1 from the decoded length]
Diffstat (limited to 'src/common')
-rw-r--r--src/common/l1sap.c5
-rw-r--r--src/common/scheduler.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 80560348..ac398d35 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -744,6 +744,7 @@ static int l1sap_ph_data_ind(struct gsm_bts_trx *trx,
uint8_t tn;
uint32_t fn;
int8_t rssi;
+ enum osmo_ph_pres_info_type pr_info = data_ind->pdch_presence_info;
rssi = data_ind->rssi;
chan_nr = data_ind->chan_nr;
@@ -767,11 +768,11 @@ static int l1sap_ph_data_ind(struct gsm_bts_trx *trx,
return 0;
}
/* drop incomplete UL block */
- if (data[0] != 7)
+ if (pr_info != PRES_INFO_BOTH)
return 0;
/* PDTCH / PACCH frame handling */
pcu_tx_data_ind(&trx->ts[tn], 0, fn, 0 /* ARFCN */,
- L1SAP_FN2MACBLOCK(fn), data + 1, len - 1, rssi);
+ L1SAP_FN2MACBLOCK(fn), data, len, rssi);
return 0;
}
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index e9d2423a..07c2e12f 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -268,7 +268,7 @@ found_msg:
}
int _sched_compose_ph_data_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
- enum trx_chan_type chan, uint8_t *l2, uint8_t l2_len, float rssi)
+ enum trx_chan_type chan, uint8_t *l2, uint8_t l2_len, float rssi, enum osmo_ph_pres_info_type presence_info)
{
struct msgb *msg;
struct osmo_phsap_prim *l1sap;
@@ -284,6 +284,7 @@ int _sched_compose_ph_data_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
l1sap->u.data.link_id = trx_chan_desc[chan].link_id;
l1sap->u.data.fn = fn;
l1sap->u.data.rssi = (int8_t) (rssi);
+ l1sap->u.data.pdch_presence_info = presence_info;
msg->l2h = msgb_put(msg, l2_len);
if (l2_len)
memcpy(msg->l2h, l2, l2_len);