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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17146 )
Change subject: osmo-bts-sysmo: merge measurement data and payload
......................................................................
osmo-bts-sysmo: merge measurement data and payload
For osmo-bts-sysmo the MPH INFO MEAS IND indication is still sent
separately. Lets merge the measurement information into the PH DATA
Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948
Related: OS#2977
---
M include/osmo-bts/l1sap.h
M src/common/l1sap.c
M src/osmo-bts-litecell15/tch.c
M src/osmo-bts-oc2g/tch.c
M src/osmo-bts-octphy/l1_tch.c
M src/osmo-bts-sysmo/l1_if.c
M src/osmo-bts-sysmo/main.c
M src/osmo-bts-sysmo/tch.c
8 files changed, 28 insertions(+), 31 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/include/osmo-bts/l1sap.h b/include/osmo-bts/l1sap.h
index 1883869..1fcf78c 100644
--- a/include/osmo-bts/l1sap.h
+++ b/include/osmo-bts/l1sap.h
@@ -134,7 +134,8 @@
int add_l1sap_header(struct gsm_bts_trx *trx, struct msgb *rmsg,
struct gsm_lchan *lchan, uint8_t chan_nr, uint32_t fn,
- uint16_t ber10k, int16_t lqual_cb);
+ uint16_t ber10k, int16_t lqual_cb, int8_t rssi,
+ int16_t ta_offs, uint8_t is_sub);
#define msgb_l1sap_prim(msg) ((struct osmo_phsap_prim *)(msg)->l1h)
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 0b51045..05dbb6f 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -176,9 +176,15 @@
return msg;
}
+/* Enclose rmsg into an osmo_phsap primitive and hand it over to the higher
+ * layers. The phsap primitive also contains measurement information. The
+ * parameters rssi, ta_offs and is_sub are only needed when the measurement
+ * information is passed along with the TCH data. When separate measurement
+ * indications are used, those last three parameters may be set to zero. */
int add_l1sap_header(struct gsm_bts_trx *trx, struct msgb *rmsg,
struct gsm_lchan *lchan, uint8_t chan_nr, uint32_t fn,
- uint16_t ber10k, int16_t lqual_cb)
+ uint16_t ber10k, int16_t lqual_cb, int8_t rssi,
+ int16_t ta_offs, uint8_t is_sub)
{
struct osmo_phsap_prim *l1sap;
@@ -194,6 +200,10 @@
l1sap->u.tch.ber10k = ber10k;
l1sap->u.tch.lqual_cb = lqual_cb;
+ l1sap->u.tch.rssi = rssi;
+ l1sap->u.tch.ta_offs_256bits = ta_offs;
+ l1sap->u.tch.is_sub = is_sub;
+
return l1sap_up(trx, l1sap);
}
diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c
index 5eae753..526b2dd 100644
--- a/src/osmo-bts-litecell15/tch.c
+++ b/src/osmo-bts-litecell15/tch.c
@@ -373,7 +373,7 @@
rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP");
return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn,
data_ind->measParam.fBer * 10000,
- data_ind->measParam.fLinkQuality * 10);
+ data_ind->measParam.fLinkQuality * 10, 0, 0, 0);
}
payload_type = data_ind->msgUnitParam.u8Buffer[0];
@@ -463,7 +463,7 @@
if (rmsg)
return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn,
data_ind->measParam.fBer * 10000,
- data_ind->measParam.fLinkQuality * 10);
+ data_ind->measParam.fLinkQuality * 10, 0, 0, 0);
return 0;
diff --git a/src/osmo-bts-oc2g/tch.c b/src/osmo-bts-oc2g/tch.c
index 1bd93e4..09ee1e7 100644
--- a/src/osmo-bts-oc2g/tch.c
+++ b/src/osmo-bts-oc2g/tch.c
@@ -373,7 +373,7 @@
rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP");
return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn,
data_ind->measParam.fBer * 10000,
- data_ind->measParam.fLinkQuality * 10);
+ data_ind->measParam.fLinkQuality * 10, 0, 0, 0);
}
payload_type = data_ind->msgUnitParam.u8Buffer[0];
@@ -475,7 +475,7 @@
if (rmsg)
return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn,
data_ind->measParam.fBer * 10000,
- data_ind->measParam.fLinkQuality * 10);
+ data_ind->measParam.fLinkQuality * 10, 0, 0, 0);
return 0;
diff --git a/src/osmo-bts-octphy/l1_tch.c b/src/osmo-bts-octphy/l1_tch.c
index df0469d..bffa1e9 100644
--- a/src/osmo-bts-octphy/l1_tch.c
+++ b/src/osmo-bts-octphy/l1_tch.c
@@ -151,7 +151,7 @@
rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP");
return add_l1sap_header(trx, rmsg, lchan, chan_nr,
data_ind->Data.ulFrameNumber,
- ber10k, lqual_cb);
+ ber10k, lqual_cb, 0, 0, 0);
}
payload_len = data_ind->Data.ulDataLength;
@@ -210,7 +210,7 @@
if (rmsg)
return add_l1sap_header(trx, rmsg, lchan, chan_nr,
data_ind->Data.ulFrameNumber,
- ber10k, lqual_cb);
+ ber10k, lqual_cb, 0, 0, 0);
return 0;
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index a891f48..2e5e5b6 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -940,25 +940,6 @@
#define LOG_FMT_MEAS "Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, BER %-3.2f, Timing %d"
#define LOG_PARAM_MEAS(meas_param) (meas_param)->fRssi, (meas_param)->fLinkQuality, (meas_param)->fBer, (meas_param)->i16BurstTiming
-static int process_meas_res(struct gsm_bts_trx *trx, uint8_t chan_nr,
- uint32_t fn, GsmL1_MeasParam_t *m)
-{
- struct osmo_phsap_prim l1sap;
- memset(&l1sap, 0, sizeof(l1sap));
- osmo_prim_init(&l1sap.oph, SAP_GSM_PH, PRIM_MPH_INFO,
- PRIM_OP_INDICATION, NULL);
- l1sap.u.info.type = PRIM_INFO_MEAS;
- l1sap.u.info.u.meas_ind.chan_nr = chan_nr;
- l1sap.u.info.u.meas_ind.ta_offs_256bits = m->i16BurstTiming * 64;
- l1sap.u.info.u.meas_ind.ber10k = (unsigned int) (m->fBer * 10000);
- l1sap.u.info.u.meas_ind.inv_rssi = (uint8_t) (m->fRssi * -1);
- l1sap.u.info.u.meas_ind.fn = fn;
-
- /* l1sap wants to take msgb ownership. However, as there is no
- * msg, it will msgb_free(l1sap.oph.msg == NULL) */
- return l1sap_up(trx, &l1sap);
-}
-
static int handle_ph_data_ind(struct femtol1_hdl *fl1, GsmL1_PhDataInd_t *data_ind,
struct msgb *l1p_msg)
{
@@ -983,8 +964,6 @@
fn = data_ind->u32Fn;
link_id = (data_ind->sapi == GsmL1_Sapi_Sacch) ? LID_SACCH : LID_DEDIC;
- process_meas_res(trx, chan_nr, fn, &data_ind->measParam);
-
gsm_fn2gsmtime(&g_time, fn);
DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s, " LOG_FMT_MEAS "\n",
diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c
index bb2c436..44c6d5d 100644
--- a/src/osmo-bts-sysmo/main.c
+++ b/src/osmo-bts-sysmo/main.c
@@ -87,6 +87,7 @@
gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR);
gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR);
gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP);
+ gsm_bts_set_feature(bts, BTS_FEAT_MEAS_PAYLOAD_COMB);
bts_model_vty_init(bts);
diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c
index 54e7313..eb719f1 100644
--- a/src/osmo-bts-sysmo/tch.c
+++ b/src/osmo-bts-sysmo/tch.c
@@ -518,7 +518,10 @@
rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP");
return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn,
data_ind->measParam.fBer * 10000,
- data_ind->measParam.fLinkQuality * 10);
+ data_ind->measParam.fLinkQuality * 10,
+ data_ind->measParam.fRssi,
+ data_ind->measParam.i16BurstTiming * 64,
+ 0);
}
payload_type = data_ind->msgUnitParam.u8Buffer[0];
@@ -613,7 +616,10 @@
if (rmsg)
return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn,
data_ind->measParam.fBer * 10000,
- data_ind->measParam.fLinkQuality * 10);
+ data_ind->measParam.fLinkQuality * 10,
+ data_ind->measParam.fRssi,
+ data_ind->measParam.i16BurstTiming * 64,
+ 0);
return 0;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17146
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948
Gerrit-Change-Number: 17146
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200219/961d2fa9/attachment.htm>