This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Max gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/3156
Separate channel request responder into function
Change-Id: I9ec3ab8de100f0bc75044f55ac769d1083d52806
Related: OS#1539
---
M src/bts.cpp
1 file changed, 22 insertions(+), 41 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/56/3156/1
diff --git a/src/bts.cpp b/src/bts.cpp
index 799188b..6ed6674 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1147,6 +1147,24 @@
}
}
+static inline void sched_ul_ass_or_rej(BTS *bts, gprs_rlcmac_bts *bts_data, struct gprs_rlcmac_dl_tbf *tbf)
+{
+ bts->channel_request_description();
+
+ /* This call will register the new TBF with the MS on success */
+ 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 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 packet access reject:\n");
+ tbf->ul_ass_state = GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ;
+ }
+}
+
void gprs_rlcmac_pdch::rcv_control_dl_ack_nack(Packet_Downlink_Ack_Nack_t *ack_nack, uint32_t fn)
{
int8_t tfi = 0; /* must be signed */
@@ -1201,27 +1219,9 @@
return;
}
/* check for channel request */
- if (ack_nack->Exist_Channel_Request_Description) {
+ if (ack_nack->Exist_Channel_Request_Description)
+ sched_ul_ass_or_rej(bts(), bts_data(), tbf);
- bts()->channel_request_description();
-
- /* This call will register the new TBF with the MS on success */
- 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 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()) {
get_meas(&meas, &ack_nack->Channel_Quality_Report);
@@ -1306,27 +1306,8 @@
}
/* check for channel request */
- if (ack_nack->Exist_ChannelRequestDescription) {
-
- bts()->channel_request_description();
-
- /* This call will register the new TBF with the MS on success */
- 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 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;
- }
- }
+ if (ack_nack->Exist_ChannelRequestDescription)
+ sched_ul_ass_or_rej(bts(), bts_data(), tbf);
/* get measurements */
if (tbf->ms()) {
--
To view, visit https://gerrit.osmocom.org/3156
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ec3ab8de100f0bc75044f55ac769d1083d52806
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>