aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-28 14:01:50 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-01 13:58:13 +0100
commit869449cdd0d4fd85279226a009aafb71ef3332cb (patch)
tree14e1e7859830065a69f449b38a88822e5725dc24 /src
parent8f8197f3fde1bafa1d720d9f685288eb4cd36e23 (diff)
edge: Move EGPRS setup from setup_tbf to tbf_alloc_ul_tbf
Currently the EGPRS mode is enabled in setup_tbf depending on the values of egprs_ms_class and bts->egprs_enabled (both must be != 0). This makes it difficult to set different values (like window parameters) depending on the direction. This commit moved the initialisation part to tbf_alloc_ul_tbf und just leaves the setting of the ms_class to setup_tbf. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src')
-rw-r--r--src/tbf.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index fd0cd98..670d633 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -546,10 +546,9 @@ static int setup_tbf(struct gprs_rlcmac_tbf *tbf,
bts = tbf->bts->bts_data();
- if (egprs_ms_class > 0 && bts->egprs_enabled) {
+ if (tbf->is_egprs_enabled()) {
/* TODO: only for 8PSK, otherwise the GPRS MS class has to be used */
ms_class = egprs_ms_class;
- tbf->enable_egprs();
}
tbf->m_created_ts = time(NULL);
@@ -619,6 +618,12 @@ struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_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) {
+ /* TODO: only for 8PSK, otherwise the GPRS MS class has to be used */
+ ms_class = egprs_ms_class;
+ tbf->enable_egprs();
+ }
+
rc = setup_tbf(tbf, ms, use_trx, ms_class, egprs_ms_class, single_slot);
/* if no resource */
if (rc < 0) {