aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-10 19:52:37 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-16 10:25:14 +0200
commit3a10dbd56428cf0e79b738f62748509bbd04aa68 (patch)
tree9f5e96fc468f62c0a1f68547b9a249f757c2aa64 /src/tbf.cpp
parente0853cdf42e60acd7759acd4869c84756eb1fa27 (diff)
tbf: Put the TFI->TBF mapping into the PDCH objects
Currently the TBFs are registered in a TFI indexed array within the TRX objects. TBFs can be searched globally by TFI and TRX number. This conflicts with the use of the same TFI for different TBF on different PDCH. This use case requires the specification of the PDCH as additional search dimension. This commit moves the TFI index TBF arrays into the PDCH objects. The related methods are updated accordingly. Ticket: #1793 Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r--src/tbf.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 70483e35..e3a441a7 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -201,11 +201,6 @@ static void tbf_unlink_pdch(struct gprs_rlcmac_tbf *tbf)
{
int ts;
- if (tbf->direction == GPRS_RLCMAC_UL_TBF)
- tbf->trx->ul_tbf[tbf->tfi()] = NULL;
- else
- tbf->trx->dl_tbf[tbf->tfi()] = NULL;
-
for (ts = 0; ts < 8; ts++) {
if (!tbf->pdch[ts])
continue;
@@ -800,16 +795,8 @@ struct msgb *gprs_rlcmac_tbf::create_ul_ass(uint32_t fn)
void gprs_rlcmac_tbf::free_all(struct gprs_rlcmac_trx *trx)
{
- for (uint8_t tfi = 0; tfi < 32; tfi++) {
- struct gprs_rlcmac_tbf *tbf;
-
- tbf = trx->ul_tbf[tfi];
- if (tbf)
- tbf_free(tbf);
- tbf = trx->dl_tbf[tfi];
- if (tbf)
- tbf_free(tbf);
- }
+ for (uint8_t ts = 0; ts < 8; ts++)
+ free_all(&trx->pdch[ts]);
}
void gprs_rlcmac_tbf::free_all(struct gprs_rlcmac_pdch *pdch)