diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-17 15:21:10 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-30 21:20:45 +0100 |
commit | 4ffc260869c5557949d44b5d13286ce205b31b66 (patch) | |
tree | 234e6ef1ea95e8ae9010facbbdd2ac74b4d47da8 /src | |
parent | 9f521cd4af46f5cc43e43c518c6a1b7e62f474ab (diff) |
bts: Remove global state from gprs_rlcmac_send_data_block_acknowledged
Diffstat (limited to 'src')
-rw-r--r-- | src/gprs_rlcmac.h | 1 | ||||
-rw-r--r-- | src/gprs_rlcmac_data.cpp | 2 | ||||
-rw-r--r-- | src/gprs_rlcmac_sched.cpp | 7 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/gprs_rlcmac.h b/src/gprs_rlcmac.h index 07d20499..c08b8801 100644 --- a/src/gprs_rlcmac.h +++ b/src/gprs_rlcmac.h @@ -221,6 +221,7 @@ int gprs_rlcmac_rcv_data_block_acknowledged(struct gprs_rlcmac_bts *bts, uint8_t *data, uint8_t len, int8_t rssi); struct msgb *gprs_rlcmac_send_data_block_acknowledged( + struct gprs_rlcmac_bts *bts, struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts); struct msgb *gprs_rlcmac_send_uplink_ack(struct gprs_rlcmac_bts *bts, diff --git a/src/gprs_rlcmac_data.cpp b/src/gprs_rlcmac_data.cpp index eb6e21ab..dff64ec5 100644 --- a/src/gprs_rlcmac_data.cpp +++ b/src/gprs_rlcmac_data.cpp @@ -1157,9 +1157,9 @@ static struct msgb *llc_dequeue(struct gprs_rlcmac_tbf *tbf) * The messages are fragmented and forwarded as data blocks. */ struct msgb *gprs_rlcmac_send_data_block_acknowledged( + struct gprs_rlcmac_bts *bts, struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts) { - struct gprs_rlcmac_bts *bts = gprs_rlcmac_bts; struct rlc_dl_header *rh; struct rlc_li_field *li; uint8_t block_length; /* total length of block, including spare bits */ diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 52ed23a2..2dfc4868 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -166,7 +166,8 @@ static struct msgb *sched_select_ctrl_msg(struct gprs_rlcmac_bts *bts, return NULL; } -struct msgb *sched_select_downlink(uint8_t trx, uint8_t ts, uint32_t fn, +static struct msgb *sched_select_downlink(struct gprs_rlcmac_bts *bts, + uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_nr, struct gprs_rlcmac_pdch *pdch) { struct msgb *msg = NULL; @@ -197,7 +198,7 @@ struct msgb *sched_select_downlink(uint8_t trx, uint8_t ts, uint32_t fn, /* next TBF to handle ressource is the next one */ pdch->next_dl_tfi = (tfi + 1) & 31; /* generate DL data block */ - msg = gprs_rlcmac_send_data_block_acknowledged(tbf, fn, + msg = gprs_rlcmac_send_data_block_acknowledged(bts, tbf, fn, ts); break; } @@ -276,7 +277,7 @@ int gprs_rlcmac_rcv_rts_block(uint8_t trx, uint8_t ts, uint16_t arfcn, /* Prio 2: select data message for downlink */ if (!msg) - msg = sched_select_downlink(trx, ts, fn, block_nr, pdch); + msg = sched_select_downlink(bts, trx, ts, fn, block_nr, pdch); /* Prio 3: send dummy contol message */ if (!msg) |