pespin has submitted this change. ( 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(-)
Approvals: osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved
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; };