diff options
author | aravind sirsikar <arvind.sirsikar@radisys.com> | 2016-11-11 17:15:10 +0530 |
---|---|---|
committer | aravind sirsikar <arvind.sirsikar@radisys.com> | 2016-11-11 17:15:10 +0530 |
commit | ed3413e39740c78148719696b0903874add580e2 (patch) | |
tree | a448e909658802c00f6d99d89d9a51cfb18a80c5 /src/bts.cpp | |
parent | c0c3afd0794c217e6fc33b18eb9366c8cfe8b020 (diff) |
Handle packet access reject during EPDAN/PDAN with channel description
When PDAN/EPDAN with channel description 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: I096a3bb44a65533b9e9b091925dd5f70a8696d6
Diffstat (limited to 'src/bts.cpp')
-rw-r--r-- | src/bts.cpp | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/src/bts.cpp b/src/bts.cpp index 4e6b5e9..0668c2d 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1077,16 +1077,23 @@ void gprs_rlcmac_pdch::rcv_control_dl_ack_nack(Packet_Downlink_Ack_Nack_t *ack_n } /* check for channel request */ if (ack_nack->Exist_Channel_Request_Description) { - LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF in ack " - "message, so we provide one:\n"); /* This call will register the new TBF with the MS on success */ - tbf_alloc_ul(bts_data(), tbf->trx->trx_no, + gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data(), + tbf->trx->trx_no, tbf->ms_class(), tbf->ms()->egprs_ms_class(), tbf->tlli(), tbf->ta(), tbf->ms()); - /* schedule uplink assignment */ - tbf->ul_ass_state = GPRS_RLCMAC_UL_ASS_SEND_ASS; + /* schedule uplink assignment or reject*/ + if (ul_tbf) { + LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF in ack " + "message, so we provide one:\n"); + tbf->ul_ass_state = GPRS_RLCMAC_UL_ASS_SEND_ASS; + } else { + LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF in ack " + "message, so we pacekt access reject:\n"); + tbf->ul_ass_state = GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ; + } } /* get measurements */ if (tbf->ms()) { @@ -1179,16 +1186,23 @@ void gprs_rlcmac_pdch::rcv_control_egprs_dl_ack_nack(EGPRS_PD_AckNack_t *ack_nac /* check for channel request */ if (ack_nack->Exist_ChannelRequestDescription) { - LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF in ack " - "message, so we provide one:\n"); /* This call will register the new TBF with the MS on success */ - tbf_alloc_ul(bts_data(), tbf->trx->trx_no, + gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data(), + tbf->trx->trx_no, tbf->ms_class(), tbf->ms()->egprs_ms_class(), tbf->tlli(), tbf->ta(), tbf->ms()); - /* schedule uplink assignment */ - tbf->ul_ass_state = GPRS_RLCMAC_UL_ASS_SEND_ASS; + /* schedule uplink assignment or reject*/ + if (ul_tbf) { + LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF in ack " + "message, so we provide one:\n"); + tbf->ul_ass_state = GPRS_RLCMAC_UL_ASS_SEND_ASS; + } else { + LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF in ack " + "message, so we send packet access reject:\n"); + tbf->ul_ass_state = GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ; + } } /* get measurements */ |