gprs_ms: Avoid enabling EGPRS if no MCS are supported

This patch avoids enabling EGPRS on MS objects if BTS/VTY assigned no
MCS supported/available for use.
As a result, if NO MCS is enabled/supported EGPRS won't be used despite
the MS announcing through EGPRS MS class that it supports EGPRS.

Change-Id: Ib19e9e006d851c2147de15f4aec36ab65250bdd3
This commit is contained in:
Pau Espin 2020-11-04 18:01:56 +01:00
parent f1159c559b
commit 9897b26e3e
2 changed files with 8 additions and 1 deletions

View File

@ -541,6 +541,13 @@ void GprsMs::set_egprs_ms_class(uint8_t ms_class_)
m_egprs_ms_class = ms_class_;
if (!m_bts->max_mcs_ul() || !m_bts->max_mcs_dl()) {
LOGPMS(this, DRLCMAC, LOGL_DEBUG,
"Avoid enabling EGPRS because use of MCS is disabled: ul=%u dl=%u\n",
m_bts->max_mcs_ul(), m_bts->max_mcs_dl());
return;
}
if (mcs_is_edge_gmsk(mcs_get_egprs_by_num(m_bts->max_mcs_ul())) &&
mcs_is_edge_gmsk(mcs_get_egprs_by_num(m_bts->max_mcs_dl())) &&
mode() != EGPRS)

View File

@ -745,7 +745,7 @@ int gprs_rlcmac_tbf::setup(int8_t use_trx, bool single_slot)
struct gprs_rlcmac_bts *bts_data = bts->bts_data();
int rc;
if (m_ms->egprs_ms_class() > 0)
if (m_ms->mode() != GPRS)
enable_egprs();
m_created_ts = time(NULL);