diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-26 18:56:43 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-30 21:24:11 +0100 |
commit | dea63b96e0a918f5430b982f86c21c5ed0bc0647 (patch) | |
tree | c605d6688ef6d9b75699d2f8379c1f5273c5c61b /src | |
parent | 05f8efc1a26426d4f88d768049cf1d35eca55118 (diff) |
sba/pdch: Use thepdch to look up a sba for a frame number
Diffstat (limited to 'src')
-rw-r--r-- | src/bts.cpp | 4 | ||||
-rw-r--r-- | src/sba.cpp | 5 | ||||
-rw-r--r-- | src/sba.h | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/bts.cpp b/src/bts.cpp index 25acd279..cb9ecdbc 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -745,7 +745,7 @@ int gprs_rlcmac_pdch::rcv_control_block( LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF " "in packet ressource request of single " "block, so we provide one:\n"); - sba = bts()->sba()->find(trx_no(), ts_no, fn); + sba = bts()->sba()->find(this, fn); if (!sba) { LOGP(DRLCMAC, LOGL_NOTICE, "MS requests UL TBF " "in packet ressource request of single " @@ -799,7 +799,7 @@ int gprs_rlcmac_pdch::rcv_control_block( LOGP(DRLCMAC, LOGL_ERROR, "RX: [PCU <- BTS] %s TFI: %u TLLI: 0x%08x FIXME: Packet ressource request\n", (tbf->direction == GPRS_RLCMAC_UL_TBF) ? "UL" : "DL", tbf->tfi, tbf->tlli); break; case MT_PACKET_MEASUREMENT_REPORT: - sba = bts()->sba()->find(trx_no(), ts_no, fn); + sba = bts()->sba()->find(this, fn); if (!sba) { LOGP(DRLCMAC, LOGL_NOTICE, "MS send measurement " "in packet ressource request of single " diff --git a/src/sba.cpp b/src/sba.cpp index 73968118..d87a9a3b 100644 --- a/src/sba.cpp +++ b/src/sba.cpp @@ -98,6 +98,11 @@ gprs_rlcmac_sba *SBAController::find(uint8_t trx, uint8_t ts, uint32_t fn) return NULL; } +gprs_rlcmac_sba *SBAController::find(const gprs_rlcmac_pdch *pdch, uint32_t fn) +{ + return find(pdch->trx_no(), pdch->ts_no, fn); +} + uint32_t SBAController::sched(uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_nr) { uint32_t sba_fn; @@ -29,6 +29,7 @@ extern "C" { class BTS; class PollController; struct gprs_rlcmac_sba; +struct gprs_rlcmac_pdch; /* * single block allocation entry @@ -53,6 +54,7 @@ public: int alloc(uint8_t *_trx, uint8_t *_ts, uint32_t *_fn, uint8_t ta); gprs_rlcmac_sba *find(uint8_t trx, uint8_t ts, uint32_t fn); + gprs_rlcmac_sba *find(const gprs_rlcmac_pdch *pdch, uint32_t fn); uint32_t sched(uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_nr); |