aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_rlcmac_sched.cpp
diff options
context:
space:
mode:
authoraravind sirsikar <arvind.sirsikar@radisys.com>2017-01-24 12:36:08 +0530
committerHarald Welte <laforge@gnumonks.org>2017-01-24 13:11:51 +0000
commite9a138e11111f509f988807bbdc5ca8cce2b3d3d (patch)
tree5c957d735e22ffad0cdc65e842b39a9e6c61ad6f /src/gprs_rlcmac_sched.cpp
parent1d8744ce967f038e4bede584845b8326d9f66c2a (diff)
Handle packet access reject during packet resource request
When Packet resource request is received, PCU will generate the packet access reject if no resources are present. The encoding is done based on section 7.1.3.2.1 and 8.1.2.5 of 44.060 version 7.27.0 Release 7. This patch also includes the test case to validate the generated packet access reject message. This patch is integration tested on Osmo-trx setup with Ettus B210 board and LG F70 MS with some simulation code changes in Osmo-pcu. Change-Id: I05ff25124b58905586caa0c0c37023d69724f121
Diffstat (limited to 'src/gprs_rlcmac_sched.cpp')
-rw-r--r--src/gprs_rlcmac_sched.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 8b27cacd..3b940f47 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -56,7 +56,9 @@ static uint32_t sched_poll(BTS *bts,
*ul_ack_tbf = ul_tbf;
if (ul_tbf->dl_ass_state == GPRS_RLCMAC_DL_ASS_SEND_ASS)
*dl_ass_tbf = ul_tbf;
- if (ul_tbf->ul_ass_state == GPRS_RLCMAC_UL_ASS_SEND_ASS)
+ if (ul_tbf->ul_ass_state == GPRS_RLCMAC_UL_ASS_SEND_ASS
+ || ul_tbf->ul_ass_state ==
+ GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ)
*ul_ass_tbf = ul_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?"
}
@@ -136,8 +138,11 @@ static struct msgb *sched_select_ctrl_msg(
* because they may kill the TBF when the CONTROL ACK is
* received, thus preventing the others from being processed.
*/
-
- if (tbf == ul_ass_tbf && tbf->direction == GPRS_RLCMAC_DL_TBF)
+ if (tbf == ul_ass_tbf && tbf->ul_ass_state ==
+ GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ)
+ msg = ul_ass_tbf->create_packet_access_reject();
+ else if (tbf == ul_ass_tbf && tbf->direction ==
+ GPRS_RLCMAC_DL_TBF)
if (tbf->ul_ass_state ==
GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ)
msg = ul_ass_tbf->create_packet_access_reject();