diff options
author | Max <msuraev@sysmocom.de> | 2016-07-18 12:50:18 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-09-09 06:37:04 +0000 |
commit | 9bbe1600cc02e1b538380393edb1dcdabe9247a2 (patch) | |
tree | 2f129366b22e1c5148f958522320bcdf524041e8 /src/tbf.cpp | |
parent | 16ddc90eabad423d247753f7d89639659e049d35 (diff) |
Fix Timing Advance handling
* initialize with invalid TA instead of making assumption that phone is
located within 550 meters (TA=0)
* only set valid TA
Change-Id: Idfc40ff0c11bdac13d9e28fbfa4e95dfc6b735b0
Related: OS#1526
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r-- | src/tbf.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp index 1fc1aefe..7a15547c 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -74,7 +74,7 @@ gprs_rlcmac_tbf::gprs_rlcmac_tbf(BTS *bts_, gprs_rlcmac_tbf_direction dir) : m_tfi(0), m_created_ts(0), m_ms(NULL), - m_ta(0), + m_ta(GSM48_TA_INVALID), m_ms_class(0), m_list(this), m_ms_list(this), @@ -151,7 +151,8 @@ void gprs_rlcmac_tbf::set_ta(uint8_t ta) if (ms()) ms()->set_ta(ta); - m_ta = ta; + if (gsm48_ta_is_valid(ta)) + m_ta = ta; } uint8_t gprs_rlcmac_tbf::ms_class() const |