aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-09-28 18:54:32 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-15 15:19:42 +0100
commit5265f59525157d135c1051f057f836395782c98e (patch)
tree97cf1d5e7f45a54817e033deab6a026fa97b0e2b
parent86b6f05d19c8559b99d548730e54c1a4bfb7beba (diff)
edge: Enable EGPRS if configured and egprs_ms_class present
Enable the TBF to use EGPRS if the bts->egprs_enabled config variable has been set via the VTY "egprs" command and if the MS has signaled a EGPRS multislot class. Tell the MS to use EGPRS if the condition above holds. Note that this will cause the MS to use EGPRS RLC block formats for further messages which are not yet understood by the PCU. Sponsored-by: On-Waves ehf
-rw-r--r--src/pcu_vty.c5
-rw-r--r--src/tbf.cpp8
2 files changed, 11 insertions, 2 deletions
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index 5196ae2..aa29b4c 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -169,7 +169,10 @@ DEFUN(cfg_pcu_egprs,
bts->egprs_enabled = 1;
- vty_out(vty, "%%Note that EGPRS support is in an experimental state. "
+ vty_out(vty, "%%Note that EGPRS support is in an experimental state "
+ "and the PCU will currently fail to use a TBF if the MS is capable "
+ "to do EGPRS. You may want to disable this feature by entering "
+ "the \"no egprs\" command. "
"Do not use this in production!%s", VTY_NEWLINE);
return CMD_SUCCESS;
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 2d0aa9f..590d115 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -546,6 +546,12 @@ static int setup_tbf(struct gprs_rlcmac_tbf *tbf,
bts = tbf->bts->bts_data();
+ 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();
+ }
+
tbf->m_created_ts = time(NULL);
tbf->set_ms_class(ms_class);
/* select algorithm */
@@ -924,7 +930,7 @@ struct msgb *gprs_rlcmac_tbf::create_ul_ass(uint32_t fn)
Encoding::write_packet_uplink_assignment(bts_data(), ass_vec, m_tfi,
(direction == GPRS_RLCMAC_DL_TBF), tlli(),
is_tlli_valid(), new_tbf, 1, bts_data()->alpha,
- bts_data()->gamma, -1, 0);
+ bts_data()->gamma, -1, is_egprs_enabled());
bitvec_pack(ass_vec, msgb_put(msg, 23));
RlcMacDownlink_t * mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t);
LOGP(DRLCMAC, LOGL_DEBUG, "+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++\n");