aboutsummaryrefslogtreecommitdiffstats
path: root/src/bts.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-20 12:06:46 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-27 13:29:59 +0200
commit767193e20b4172dfb0e76ec63444115dc5ae8806 (patch)
treedb3cf75b01e916afa5ce994e239111c454113382 /src/bts.cpp
parentd1cb41bfd020eb9b94b17e5bcaa5be36bceccc12 (diff)
tbf: Remove the TLLI from the TBFs
Currently the TLLI is stored in each TBF. Since each MS is now represented by a GprsMs object which takes care of TLLI updating, and each TBF that has been associated with an TLLI also contains a reference to a GprsMs object, per TBF TLLI handling is no longer needed. Keeping all TBF m_tlli members up to date is complex and doesn't currently work correctly in all circumstances. This commit removes m_tlli and related members from the TBF class and the tbf_by_tlli functions from the BTS class. Ticket: #1674 Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/bts.cpp')
-rw-r--r--src/bts.cpp40
1 files changed, 5 insertions, 35 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 72c33ed..371d369 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -217,39 +217,6 @@ int BTS::add_paging(uint8_t chan_needed, uint8_t *identity_lv)
return 0;
}
-/* search for active downlink tbf */
-gprs_rlcmac_dl_tbf *BTS::dl_tbf_by_tlli(uint32_t tlli)
-{
- return static_cast<gprs_rlcmac_dl_tbf *>(tbf_by_tlli(tlli, GPRS_RLCMAC_DL_TBF));
-}
-
-/* search for active uplink tbf */
-gprs_rlcmac_ul_tbf *BTS::ul_tbf_by_tlli(uint32_t tlli)
-{
- return static_cast<gprs_rlcmac_ul_tbf *>(tbf_by_tlli(tlli, GPRS_RLCMAC_UL_TBF));
-}
-
-/* search for active downlink or uplink tbf */
-gprs_rlcmac_tbf *BTS::tbf_by_tlli(uint32_t tlli, enum gprs_rlcmac_tbf_direction dir)
-{
- struct gprs_rlcmac_tbf *tbf;
- struct llist_pods *lpods;
- if (dir == GPRS_RLCMAC_UL_TBF) {
- llist_pods_for_each_entry(tbf, &m_bts.ul_tbfs, list, lpods) {
- if (tbf->state_is_not(GPRS_RLCMAC_RELEASING)
- && tbf->tlli() == tlli && tbf->is_tlli_valid())
- return tbf;
- }
- } else {
- llist_pods_for_each_entry(tbf, &m_bts.dl_tbfs, list, lpods) {
- if (tbf->state_is_not(GPRS_RLCMAC_RELEASING)
- && tbf->tlli() == tlli && tbf->is_tlli_valid())
- return tbf;
- }
- }
- return NULL;
-}
-
gprs_rlcmac_dl_tbf *BTS::dl_tbf_by_poll_fn(uint32_t fn, uint8_t trx, uint8_t ts)
{
struct gprs_rlcmac_dl_tbf *tbf;
@@ -377,9 +344,10 @@ int BTS::tfi_find_free(enum gprs_rlcmac_tbf_direction dir,
int BTS::rcv_imm_ass_cnf(const uint8_t *data, uint32_t fn)
{
- struct gprs_rlcmac_dl_tbf *dl_tbf;
+ struct gprs_rlcmac_dl_tbf *dl_tbf = NULL;
uint8_t plen;
uint32_t tlli;
+ GprsMs *ms;
/* move to IA Rest Octets */
plen = data[0] >> 2;
@@ -399,7 +367,9 @@ int BTS::rcv_imm_ass_cnf(const uint8_t *data, uint32_t fn)
tlli |= (*data++) << 4;
tlli |= (*data++) >> 4;
- dl_tbf = dl_tbf_by_tlli(tlli);
+ ms = ms_by_tlli(tlli);
+ if (ms)
+ dl_tbf = ms->dl_tbf();
if (!dl_tbf) {
LOGP(DRLCMAC, LOGL_ERROR, "Got IMM.ASS confirm, but TLLI=%08x "
"does not exit\n", tlli);