aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-06-09 12:37:17 +0200
committerHarald Welte <laforge@gnumonks.org>2016-06-12 15:42:34 +0000
commitc1586388dc820853095f6dfbc274792d688640cd (patch)
tree989d9c0fd38e4f478aad3d5e36383d4af0163d45
parent51bfebec39cc0a01e30ac9c655866678a46b5c2d (diff)
Add DTXd support for sysmoBTS and LC15
* set/clear DTXd activity indicator for measurement reporting * set DTXd status based on information from RSL Related: OS#1563 Change-Id: I148a75725c4e5089b6f2da6e9adcbe94170d3257 Depends-On: I4a033b03fcd0deb4db7a38273b5407511dbf1d6c Reviewed-on: https://gerrit.osmocom.org/220 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
-rw-r--r--src/common/rsl.c13
-rw-r--r--src/osmo-bts-litecell15/l1_if.c2
-rw-r--r--src/osmo-bts-sysmo/l1_if.c2
3 files changed, 11 insertions, 6 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index e13d48c5..dddde693 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -103,6 +103,8 @@ static void lchan_tchmode_from_cmode(struct gsm_lchan *lchan,
struct rsl_ie_chan_mode *cm)
{
lchan->rsl_cmode = cm->spd_ind;
+ lchan->ts->trx->bts->dtxd = (cm->dtx_dtu & RSL_CMOD_DTXd) ? true : false;
+
switch (cm->chan_rate) {
case RSL_CMOD_SP_GSM1:
lchan->tch_mode = GSM48_CMODE_SPEECH_V1;
@@ -1694,8 +1696,7 @@ static int rslms_is_meas_rep(struct msgb *msg)
}
/* 8.4.8 MEASUREMENT RESult */
-static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len,
- bool dtxd_used)
+static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len)
{
struct msgb *msg;
uint8_t meas_res[16];
@@ -1713,8 +1714,10 @@ static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len,
return -ENOMEM;
msgb_tv_put(msg, RSL_IE_MEAS_RES_NR, lchan->meas.res_nr++);
- size_t ie_len = gsm0858_rsl_ul_meas_enc(&lchan->meas.ul_res, dtxd_used,
+ size_t ie_len = gsm0858_rsl_ul_meas_enc(&lchan->meas.ul_res,
+ lchan->tch.dtxd_active,
meas_res);
+ lchan->tch.dtxd_active = false;
if (ie_len >= 3) {
msgb_tlv_put(msg, RSL_IE_UPLINK_MEAS, ie_len, meas_res);
lchan->meas.flags &= ~LC_UL_M_F_RES_VALID;
@@ -1755,9 +1758,7 @@ int lapdm_rll_tx_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx)
LOGP(DRSL, LOGL_INFO, "%s Handing RLL msg %s from LAPDm to MEAS REP\n",
gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type));
- /* FIXME: add dtx downlink support */
- rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg),
- false);
+ rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg));
msgb_free(msg);
return rc;
} else {
diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index 6a60b3fe..1054abab 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -439,6 +439,8 @@ static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg,
l1p->u.phDataReq.msgUnitParam.u8Size);
} else {
/* empty frame */
+ if (trx->bts->dtxd && trx != trx->bts->c0)
+ lchan->tch.dtxd_active = true;
empty_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr);
}
/* send message to DSP's queue */
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index debc80ae..d6d0cdd1 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -433,6 +433,8 @@ static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg,
l1p->u.phDataReq.msgUnitParam.u8Size);
} else {
/* empty frame */
+ if (trx->bts->dtxd && trx != trx->bts->c0)
+ lchan->tch.dtxd_active = true;
empty_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr);
}
/* send message to DSP's queue */