aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-06-09 12:37:17 +0200
committerMax <msuraev@sysmocom.de>2016-06-10 14:46:36 +0200
commit9966ec6459d0e8c704f7eca010ba50c3f5953f36 (patch)
tree709c124248e9eb7bab4ae25655ebc9c9c3a5d792
parentc00a2d69d3f44e47ffeeb4561174c1f16dfc261c (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
-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 e13d48c..dddde69 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 6a60b3f..1054aba 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 debc80a..d6d0cdd 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 */