pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-gprs/+/34166 )
Change subject: tbf_ul_ass: Don't check USF during SingleBlock Allocation
......................................................................
tbf_ul_ass: Don't check USF during SingleBlock Allocation
Change-Id: Icc2c17dc1933ad95da1b6b050f38a769909b23e5
---
M include/osmocom/gprs/rlcmac/tbf_ul_ass_fsm.h
M src/rlcmac/tbf_ul_ass_fsm.c
2 files changed, 18 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/66/34166/1
diff --git a/include/osmocom/gprs/rlcmac/tbf_ul_ass_fsm.h
b/include/osmocom/gprs/rlcmac/tbf_ul_ass_fsm.h
index 9026459..ea9e521 100644
--- a/include/osmocom/gprs/rlcmac/tbf_ul_ass_fsm.h
+++ b/include/osmocom/gprs/rlcmac/tbf_ul_ass_fsm.h
@@ -40,6 +40,7 @@
struct gprs_rlcmac_ul_tbf_allocation phase2_alloc;
bool tbf_starting_time_exists;
uint32_t tbf_starting_time;
+ bool sba; /* Single Block Allocation was received from the network */
/* Number of packet resource request transmitted (T3168) */
unsigned int pkt_res_req_proc_attempts;
};
diff --git a/src/rlcmac/tbf_ul_ass_fsm.c b/src/rlcmac/tbf_ul_ass_fsm.c
index 4fde6b7..8244f8e 100644
--- a/src/rlcmac/tbf_ul_ass_fsm.c
+++ b/src/rlcmac/tbf_ul_ass_fsm.c
@@ -147,6 +147,7 @@
LOGPFSML(ctx->fi, LOGL_INFO, "MS requested 1-Phase-Access, but Network
forces 2-Phase-Access\n");
ctx->ass_type = GPRS_RLCMAC_TBF_UL_ASS_TYPE_2PHASE;
}
+ ctx->sba = true;
ctx->tbf_starting_time_exists = true;
ctx->tbf_starting_time =
TBF_StartingTime_to_fn(&d->iaro->u.hh.u.UplinkDownlinkAssignment.ul_dl.Packet_Uplink_ImmAssignment.Access.SingleBlockAllocation.TBF_STARTING_TIME,
d->fn);
@@ -367,6 +368,7 @@
data_ctx->msg = create_pkt_resource_req(ctx, data_ctx);
if (!data_ctx->msg)
return;
+ ctx->sba = false; /* Reset state */
tbf_ul_ass_fsm_state_chg(fi, GPRS_RLCMAC_TBF_UL_ASS_ST_WAIT_PKT_UL_ASS);
break;
default:
@@ -694,8 +696,12 @@
switch (ctx->fi->state) {
case GPRS_RLCMAC_TBF_UL_ASS_ST_SCHED_PKT_RES_REQ:
- return (ctx->phase1_alloc.ts[bi->ts].allocated &&
- ctx->phase1_alloc.ts[bi->ts].usf == bi->usf);
+ if (!ctx->phase1_alloc.ts[bi->ts].allocated)
+ return false;
+ if (ctx->sba)
+ return (!ctx->tbf_starting_time_exists || ctx->tbf_starting_time == bi->fn);
+ /* No SBA, check assigned USF: */
+ return ctx->phase1_alloc.ts[bi->ts].usf == bi->usf;
default:
return false;
};
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-gprs/+/34166
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: Icc2c17dc1933ad95da1b6b050f38a769909b23e5
Gerrit-Change-Number: 34166
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange