aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf_dl.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-01-20 13:30:34 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-08 00:45:36 +0100
commitf4bb42459ca4f3e18f9ee3d3a27389b85c7692e8 (patch)
tree7d4a0d90bc8f17300a964ce653bcde670714703c /src/tbf_dl.cpp
parent4a07a3be11e7366b557bab795aa23b42725ec23e (diff)
tbf: Low prio for BSSPG values for GPRS/EGPRS MS class
Currently the values in the BSSGP RA Cap IE are eventually use overwrite the 'good' values obtained from the MS earlier. Use the 'good' values when the are present, which is assumed if at least one of ms->ms_class() or ms->egprs_ms_class() is set. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf_dl.cpp')
-rw-r--r--src/tbf_dl.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 1827469..a55f179 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -181,7 +181,7 @@ static int tbf_new_dl_assignment(struct gprs_rlcmac_bts *bts,
*/
int gprs_rlcmac_dl_tbf::handle(struct gprs_rlcmac_bts *bts,
const uint32_t tlli, const uint32_t tlli_old, const char *imsi,
- const uint8_t ms_class, uint8_t egprs_ms_class,
+ uint8_t ms_class, uint8_t egprs_ms_class,
const uint16_t delay_csec,
const uint8_t *data, const uint16_t len)
{
@@ -191,12 +191,15 @@ int gprs_rlcmac_dl_tbf::handle(struct gprs_rlcmac_bts *bts,
/* check for existing TBF */
ms = bts->bts->ms_store().get_ms(tlli, tlli_old, imsi);
- if (ms)
+ if (ms) {
dl_tbf = ms->dl_tbf();
- /* Work-around to get EGPRS MS class */
- if (ms && !egprs_ms_class)
- egprs_ms_class = ms->egprs_ms_class();
+ /* If we known the GPRS/EGPRS MS class, use it */
+ if (ms->ms_class() || ms->egprs_ms_class()) {
+ ms_class = ms->ms_class();
+ egprs_ms_class = ms->egprs_ms_class();
+ }
+ }
if (ms && strlen(ms->imsi()) == 0) {
ms_old = bts->bts->ms_store().get_ms(0, 0, imsi);