aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-07-25 15:47:03 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2012-07-25 15:47:03 +0200
commitef42540f0db9d305c542672044ba4faa2f074b10 (patch)
tree07d16340b769e9db19f70b267201199e31347f9e
parent0b0f2c06952391b75fa9989f4fcfa5412694fadb (diff)
Be sure to priorize uplink assignment (PACCH)
This is required because uplink assignment (PACCH) is done on a request by mobile, so the mobile expects that it get this assignment in return. After that we may assign downlink.
-rw-r--r--src/gprs_rlcmac_sched.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index efd8a9e..003f503 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -23,9 +23,9 @@
uint32_t sched_poll(uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_nr,
struct gprs_rlcmac_tbf **poll_tbf,
- struct gprs_rlcmac_tbf **ul_ack_tbf,
+ struct gprs_rlcmac_tbf **ul_ass_tbf,
struct gprs_rlcmac_tbf **dl_ass_tbf,
- struct gprs_rlcmac_tbf **ul_ass_tbf)
+ struct gprs_rlcmac_tbf **ul_ack_tbf)
{
struct gprs_rlcmac_tbf *tbf;
uint32_t poll_fn;
@@ -104,23 +104,23 @@ uint8_t sched_select_uplink(uint8_t trx, uint8_t ts, uint32_t fn,
struct msgb *sched_select_ctrl_msg(uint8_t trx, uint8_t ts, uint32_t fn,
uint8_t block_nr, struct gprs_rlcmac_pdch *pdch,
- struct gprs_rlcmac_tbf *ul_ack_tbf,
+ struct gprs_rlcmac_tbf *ul_ass_tbf,
struct gprs_rlcmac_tbf *dl_ass_tbf,
- struct gprs_rlcmac_tbf *ul_ass_tbf)
+ struct gprs_rlcmac_tbf *ul_ack_tbf)
{
struct msgb *msg = NULL;
struct gprs_rlcmac_tbf *tbf = NULL;
- /* schedule PACKET DOWNLINK ASSIGNMENT */
- if (dl_ass_tbf) {
- tbf = dl_ass_tbf;
- msg = gprs_rlcmac_send_packet_downlink_assignment(tbf, fn);
- }
- /* schedule PACKET UPLINK ASSIGNMENT */
- if (!msg && ul_ass_tbf) {
+ /* schedule PACKET UPLINK ASSIGNMENT (high priority) */
+ if (ul_ass_tbf) {
tbf = ul_ass_tbf;
msg = gprs_rlcmac_send_packet_uplink_assignment(tbf, fn);
}
+ /* schedule PACKET DOWNLINK ASSIGNMENT (low priotiry) */
+ if (!msg && dl_ass_tbf) {
+ tbf = dl_ass_tbf;
+ msg = gprs_rlcmac_send_packet_downlink_assignment(tbf, fn);
+ }
/* schedule PACKET UPLINK ACK */
if (!msg && ul_ack_tbf) {
tbf = ul_ack_tbf;
@@ -223,8 +223,8 @@ int gprs_rlcmac_rcv_rts_block(uint8_t trx, uint8_t ts, uint16_t arfcn,
/* store last frame number of RTS */
pdch->last_rts_fn = fn;
- poll_fn = sched_poll(trx, ts, fn, block_nr, &poll_tbf, &ul_ack_tbf,
- &dl_ass_tbf, &ul_ass_tbf);
+ poll_fn = sched_poll(trx, ts, fn, block_nr, &poll_tbf, &ul_ass_tbf,
+ &dl_ass_tbf, &ul_ack_tbf);
/* check uplink ressource for polling */
if (poll_tbf)
LOGP(DRLCMACSCHED, LOGL_DEBUG, "Received RTS for PDCH: TRX=%d "
@@ -239,8 +239,8 @@ int gprs_rlcmac_rcv_rts_block(uint8_t trx, uint8_t ts, uint16_t arfcn,
usf = sched_select_uplink(trx, ts, fn, block_nr, pdch);
/* Prio 1: select control message */
- msg = sched_select_ctrl_msg(trx, ts, fn, block_nr, pdch, ul_ack_tbf,
- dl_ass_tbf, ul_ass_tbf);
+ msg = sched_select_ctrl_msg(trx, ts, fn, block_nr, pdch, ul_ass_tbf,
+ dl_ass_tbf, ul_ack_tbf);
/* Prio 2: select data message for downlink */
if (!msg)