aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ta.cpp5
-rw-r--r--src/ta.h1
-rw-r--r--src/tbf.cpp3
-rw-r--r--tests/tbf/TbfTest.cpp2
4 files changed, 11 insertions, 0 deletions
diff --git a/src/ta.cpp b/src/ta.cpp
index 05342ea..0bc1d66 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 8508acb..9b64280 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 d78090f..356984f 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);
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 03c2324..86c5bbd 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -74,6 +74,8 @@ static void test_tbf_tlli_update()
OSMO_ASSERT(the_bts.tbf_by_tlli(0x4232, GPRS_RLCMAC_DL_TBF) == dl_tbf);
OSMO_ASSERT(the_bts.tbf_by_tlli(0x4232, GPRS_RLCMAC_UL_TBF) == ul_tbf);
+
+ OSMO_ASSERT(the_bts.timing_advance()->recall(0x4232) == 4);
}
int main(int argc, char **argv)