aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-01-07 16:15:58 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-05 13:20:45 +0100
commit08f631c1978a128bc516923d9c33bc3198e22a33 (patch)
treeac9552a0fa697b089e2598da2fac62f34a5e2b8d /src
parent369c2fb7b48652d812c4d085e42c01ff0348d3d0 (diff)
edge: Enable EGPRS in downlink TBFs
Currently GPRS is always used for downlink, which violates TS 44.060 (concurrent TBF must have the same mode). Enable EGPRS mode for downlink if the EGPRS MS class is != 0 and EGRPS has been enabled. Note that EGPRS Ack/Nack handling is not yet implemented, so enabling EGPRS will not work still. But we will now get EGPRS DL ACK/NACK messages now from the MS. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src')
-rw-r--r--src/tbf.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 8fac767b..9c5502a8 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -629,6 +629,8 @@ struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts,
tbf->m_window.set_sns(RLC_EGPRS_SNS);
tbf->m_window.set_ws(RLC_EGPRS_MIN_WS);
setup_egprs_mode(bts, ms);
+ LOGP(DRLCMAC, LOGL_INFO, "Enabled EGPRS for %s, mode %s\n",
+ tbf->name(), GprsCodingScheme::modeName(ms->mode()));
}
rc = setup_tbf(tbf, ms, use_trx, ms_class, egprs_ms_class, single_slot);
@@ -678,8 +680,8 @@ struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts,
int rc;
LOGP(DRLCMAC, LOGL_DEBUG, "********** TBF starts here **********\n");
- LOGP(DRLCMAC, LOGL_INFO, "Allocating %s TBF: MS_CLASS=%d\n",
- "DL", ms_class);
+ LOGP(DRLCMAC, LOGL_INFO, "Allocating %s TBF: MS_CLASS=%d/%d\n",
+ "DL", ms_class, egprs_ms_class);
tbf = talloc(tall_pcu_ctx, struct gprs_rlcmac_dl_tbf);
@@ -692,6 +694,15 @@ struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts,
if (!ms)
ms = bts->bts->ms_alloc(ms_class, egprs_ms_class);
+ if (egprs_ms_class > 0 && bts->egprs_enabled) {
+ tbf->enable_egprs();
+ tbf->m_window.set_sns(RLC_EGPRS_SNS);
+ tbf->m_window.set_ws(RLC_EGPRS_MIN_WS);
+ setup_egprs_mode(bts, ms);
+ LOGP(DRLCMAC, LOGL_INFO, "Enabled EGPRS for %s, mode %s\n",
+ tbf->name(), GprsCodingScheme::modeName(ms->mode()));
+ }
+
rc = setup_tbf(tbf, ms, use_trx, ms_class, 0, single_slot);
/* if no resource */
if (rc < 0) {