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
This commit is contained in:
Jacob Erlbeck 2015-09-28 18:54:32 +02:00
parent 86b6f05d19
commit 5265f59525
2 changed files with 11 additions and 2 deletions

View File

@ -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;

View File

@ -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");