diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-01-15 08:59:34 +0100 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2013-01-15 08:59:34 +0100 |
commit | 02d7cd2ac204ef6f65a879afff101f5ec1999c44 (patch) | |
tree | 1d38a95820c62d142f763a8087f85b80bd4fb6ce /src/gprs_bssgp_pcu.cpp | |
parent | 138f4e62d2f2504845cb34491f5278569ec881db (diff) |
Get rid of allocating first timeslot at tfi_alloc
This simpliefies the allocation process.
tfi_alloc is responsible to allocate a TFI, not a time slot.
The first time slot available depends on multislot class and on other
ongoing TBF (concurrent TBFs), so it is part of the allocation
algorithm to select it.
Diffstat (limited to 'src/gprs_bssgp_pcu.cpp')
-rw-r--r-- | src/gprs_bssgp_pcu.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 414e96bb..6ea99203 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -192,7 +192,8 @@ int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg, struct tlv_parsed *tp) tbf->ms_class = ms_class; } } else { - uint8_t trx, ts, use_trx, first_ts, ta, ss; + uint8_t trx, ta, ss; + int8_t use_trx; struct gprs_rlcmac_tbf *old_tbf; /* check for uplink data, so we copy our informations */ @@ -200,27 +201,25 @@ int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg, struct tlv_parsed *tp) if (tbf && tbf->dir.ul.contention_resolution_done && !tbf->dir.ul.final_ack_sent) { use_trx = tbf->trx; - first_ts = tbf->first_ts; ta = tbf->ta; ss = 0; old_tbf = tbf; } else { use_trx = -1; - first_ts = -1; ta = 0; /* FIXME: initial TA */ ss = 1; /* PCH assignment only allows one timeslot */ old_tbf = NULL; } // Create new TBF (any TRX) - tfi = tfi_alloc(GPRS_RLCMAC_DL_TBF, &trx, &ts, use_trx, first_ts); + tfi = tfi_alloc(GPRS_RLCMAC_DL_TBF, &trx, use_trx); if (tfi < 0) { LOGP(DRLCMAC, LOGL_NOTICE, "No PDCH resource\n"); /* FIXME: send reject */ return -EBUSY; } /* set number of downlink slots according to multislot class */ - tbf = tbf_alloc(tbf, GPRS_RLCMAC_DL_TBF, tfi, trx, ts, ms_class, + tbf = tbf_alloc(tbf, GPRS_RLCMAC_DL_TBF, tfi, trx, ms_class, ss); if (!tbf) { LOGP(DRLCMAC, LOGL_NOTICE, "No PDCH ressource\n"); |