diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-06-02 12:33:30 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-06-08 09:38:49 +0200 |
commit | befc760f8677d794e5a0dbc1f02f8ac85b649aa0 (patch) | |
tree | 4e8bf7176797ed929df9d15fc58d71a5990ea5d9 /src/gprs_rlcmac_ts_alloc.cpp | |
parent | 489a2b35d87610fb077a51de696555a54e5fb247 (diff) |
tbf: Store MS class in GprsMs objects
The ms_class value is a property of the MS and thus belongs to the
GprsMs class. Nevertheless the MS object is created after the TLLI
gets known, so the value still has to be stored in the TBF initially.
This commit add the ms_class value to the GprsMs class and introduces
TBF accessor functions which either access that object or, if that is
not available, the value stored locally.
Ticket: #1674
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/gprs_rlcmac_ts_alloc.cpp')
-rw-r--r-- | src/gprs_rlcmac_ts_alloc.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 27b01d79..e8bedadd 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -146,7 +146,7 @@ int alloc_algorithm_a(struct gprs_rlcmac_bts *bts, uint8_t ts; LOGP(DRLCMAC, LOGL_DEBUG, "Slot Allocation (Algorithm A) for class " - "%d\n", tbf->ms_class); + "%d\n", tbf->ms_class()); ts = find_enabled_pdch(tbf->trx, 0); if (ts == 8) @@ -540,16 +540,16 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, uint8_t slotcount = 0; - if (tbf->ms_class >= 32) { + if (tbf->ms_class() >= 32) { LOGP(DRLCMAC, LOGL_ERROR, "Multislot class %d out of range.\n", - tbf->ms_class); + tbf->ms_class()); return -EINVAL; } - if (tbf->ms_class) { - ms_class = &gprs_ms_multislot_class[tbf->ms_class]; + if (tbf->ms_class()) { + ms_class = &gprs_ms_multislot_class[tbf->ms_class()]; LOGP(DRLCMAC, LOGL_DEBUG, "Slot Allocation (Algorithm B) for " - "class %d\n", tbf->ms_class); + "class %d\n", tbf->ms_class()); } else { ms_class = &gprs_ms_multislot_class[12]; LOGP(DRLCMAC, LOGL_DEBUG, "Slot Allocation (Algorithm B) for " @@ -558,7 +558,7 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, if (ms_class->tx == MS_NA) { LOGP(DRLCMAC, LOGL_NOTICE, "Multislot class %d not " - "applicable.\n", tbf->ms_class); + "applicable.\n", tbf->ms_class()); return -EINVAL; } |