From bc1626e5de38d7efbea272596d0ec5cc37f4b424 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 30 Oct 2013 19:50:49 +0100 Subject: tbf: Update the timing advance for the new tlli based on the old one --- src/ta.cpp | 5 +++++ src/ta.h | 1 + src/tbf.cpp | 3 +++ 3 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/ta.cpp b/src/ta.cpp index 05342ea9..0bc1d660 100644 --- a/src/ta.cpp +++ b/src/ta.cpp @@ -135,3 +135,8 @@ int TimingAdvance::flush() return count; } +int TimingAdvance::update(uint32_t, uint32_t new_tlli, uint8_t ta) +{ + /* for now just add the new entry and don't bother about the old one */ + return remember(new_tlli, ta); +} diff --git a/src/ta.h b/src/ta.h index 8508acbf..9b64280f 100644 --- a/src/ta.h +++ b/src/ta.h @@ -29,6 +29,7 @@ class TimingAdvance { public: TimingAdvance(); + int update(uint32_t old_tlli, uint32_t new_tlli, uint8_t ta); int remember(uint32_t tlli, uint8_t ta); int recall(uint32_t tlli); int flush(); diff --git a/src/tbf.cpp b/src/tbf.cpp index d78090fb..356984f5 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1641,6 +1641,9 @@ void gprs_rlcmac_tbf::update_tlli(uint32_t tlli) } } + /* update the timing advance for the new tlli */ + bts->timing_advance()->update(m_tlli, tlli, ta); + LOGP(DRLCMAC, LOGL_NOTICE, "%s changing tlli from TLLI=0x%08x TLLI=0x%08x ul_changed=%d\n", tbf_name(this), m_tlli, tlli, changedUl); -- cgit v1.2.3