aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_ms.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-02 16:00:41 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-08 09:39:25 +0200
commita700dd9e11d31805cfe8dd07fc27ac96425cbf0c (patch)
tree7a7d6922c8cb5f1dbd3bfe95dcdb72e766bacddf /src/gprs_ms.cpp
parent17214bb06de4a1d8b626dab0f695017b0c74b358 (diff)
tbf: Move the current CS field to GprsMs
Currently the current CS value is stored in the cs field of gprs_rlcmac_tbf and initialised when it is used the first time. This commit adds separate fields for UL and DL CS values to the GprsMs class and provides corresponding getter methods for GprsMs and gprs_rlcmac_tbf. Ticket: #1739 Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/gprs_ms.cpp')
-rw-r--r--src/gprs_ms.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp
index c2e83721..dc8783c4 100644
--- a/src/gprs_ms.cpp
+++ b/src/gprs_ms.cpp
@@ -21,6 +21,7 @@
#include "gprs_ms.h"
+#include "bts.h"
#include "tbf.h"
#include "gprs_debug.h"
@@ -74,6 +75,8 @@ GprsMs::GprsMs(BTS *bts, uint32_t tlli) :
m_new_dl_tlli(0),
m_ta(0),
m_ms_class(0),
+ m_current_cs_ul(1),
+ m_current_cs_dl(1),
m_is_idle(true),
m_ref(0),
m_list(this)
@@ -84,6 +87,15 @@ GprsMs::GprsMs(BTS *bts, uint32_t tlli) :
memset(&m_timer, 0, sizeof(m_timer));
m_timer.cb = GprsMs::timeout;
m_llc_queue.init();
+ if (m_bts) {
+ m_current_cs_ul = m_bts->bts_data()->initial_cs_ul;
+ if (m_current_cs_ul < 1)
+ m_current_cs_ul = 1;
+
+ m_current_cs_dl = m_bts->bts_data()->initial_cs_dl;
+ if (m_current_cs_dl < 1)
+ m_current_cs_dl = 1;
+ }
}
GprsMs::~GprsMs()