From 9200ce60196a289968144582f1acfac25e17eed5 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Fri, 22 May 2015 17:48:04 +0200 Subject: tbf: Store the timing advance (TA) value in the GprsMs object The TA value rather relates to an MS and not to a single TBF. So all TBFs share the same TA value. Currently the TA value is stored per TBF and eventually copied from an old TBF to a new one. It is in general only passed with an RACH request when the TLLI and thus the MS is not yet known. This commit adds a TA member to the GprsMs class and uses that one when the TBF is associated to an MS object. Since the TBF is not always associated with an MS object (after RACH or when it has been replaced by another TBF), the TA value is still stored in each TBF and that value is used as long as no MS object is being associated. Sponsored-by: On-Waves ehf --- src/gprs_ms.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/gprs_ms.h') diff --git a/src/gprs_ms.h b/src/gprs_ms.h index 7f8af414..9c3acb4f 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -59,6 +59,9 @@ public: const char *imsi() const; void set_imsi(const char *imsi); + uint8_t ta() const; + void set_ta(uint8_t ta); + void attach_tbf(gprs_rlcmac_tbf *tbf); void attach_ul_tbf(gprs_rlcmac_ul_tbf *tbf); void attach_dl_tbf(gprs_rlcmac_dl_tbf *tbf); @@ -88,6 +91,7 @@ private: /* store IMSI for look-up and PCH retransmission */ char m_imsi[16]; + uint8_t m_ta; bool m_is_idle; int m_ref; @@ -111,3 +115,8 @@ inline const char *GprsMs::imsi() const { return m_imsi; } + +inline uint8_t GprsMs::ta() const +{ + return m_ta; +} -- cgit v1.2.3