aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_rlcmac_sched.cpp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-19 21:10:38 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-30 21:24:10 +0100
commit34bd8bdf30769b5aab50b87045ff2b621429c7be (patch)
tree2f3fcf6daeacb0666a09bacff10cb30275f31720 /src/gprs_rlcmac_sched.cpp
parent9f0c1d216a0596f733c55d787ef0eb0693362d49 (diff)
bts/tbf: Move the lists into the BTS and do the look-up from the BTS
The list belongs to the BTS. This makes cleaning this up more easy and establishes a hierachy of resources that start from the BTS. The debug_diagram code is now broken.
Diffstat (limited to 'src/gprs_rlcmac_sched.cpp')
-rw-r--r--src/gprs_rlcmac_sched.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 42110931..069e90f6 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -23,7 +23,8 @@
#include <bts.h>
#include <tbf.h>
-static uint32_t sched_poll(uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_nr,
+static uint32_t sched_poll(struct gprs_rlcmac_bts *bts,
+ uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_nr,
struct gprs_rlcmac_tbf **poll_tbf,
struct gprs_rlcmac_tbf **ul_ass_tbf,
struct gprs_rlcmac_tbf **dl_ass_tbf,
@@ -37,7 +38,7 @@ static uint32_t sched_poll(uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_n
if ((block_nr % 3) == 2)
poll_fn ++;
poll_fn = poll_fn % 2715648;
- llist_for_each_entry(tbf, &gprs_rlcmac_ul_tbfs, list) {
+ llist_for_each_entry(tbf, &bts->ul_tbfs, list) {
/* this trx, this ts */
if (tbf->trx_no != trx || tbf->control_ts != ts)
continue;
@@ -53,7 +54,7 @@ static uint32_t sched_poll(uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_n
*ul_ass_tbf = tbf;
#warning "Is this supposed to be fair? The last TBF for each wins? Maybe use llist_add_tail and skip once we have all states?"
}
- llist_for_each_entry(tbf, &gprs_rlcmac_dl_tbfs, list) {
+ llist_for_each_entry(tbf, &bts->dl_tbfs, list) {
/* this trx, this ts */
if (tbf->trx_no != trx || tbf->control_ts != ts)
continue;
@@ -232,7 +233,7 @@ int gprs_rlcmac_rcv_rts_block(struct gprs_rlcmac_bts *bts,
/* store last frame number of RTS */
pdch->last_rts_fn = fn;
- poll_fn = sched_poll(trx, ts, fn, block_nr, &poll_tbf, &ul_ass_tbf,
+ poll_fn = sched_poll(bts, trx, ts, fn, block_nr, &poll_tbf, &ul_ass_tbf,
&dl_ass_tbf, &ul_ack_tbf);
/* check uplink ressource for polling */
if (poll_tbf)