rlcmac: Fix gprs_rlcmac_ul_tbf_in_contention_resolution() for 1phase access

Change-Id: I7d08be3d8fa584ebad98d3548c05bd1ff284ba7e
This commit is contained in:
Pau Espin 2023-03-02 13:27:12 +01:00
parent aef4114abb
commit c7a55b3c4a
1 changed files with 8 additions and 4 deletions

View File

@ -103,10 +103,14 @@ bool gprs_rlcmac_ul_tbf_in_contention_resolution(const struct gprs_rlcmac_ul_tbf
/* TS 44.60 7.1.3.3: For 2hase access, contention resolution is
* successful once we get out of GPRS_RLCMAC_TBF_UL_ST_WAIT_ASSIGN
* (when we receive a Pkt Ul Ass, see TS 44.60 7.1.3.3) */
/* 1phase access: Check if either T3164 or T3166 are active: */
return (ul_tbf->ul_ass_fsm.ass_type == GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE &&
osmo_timer_pending(&fi->timer) &&
(fi->T == 3164 || fi->T == 3166));
if (ul_tbf->ul_ass_fsm.ass_type == GPRS_RLCMAC_TBF_UL_ASS_TYPE_2PHASE)
return true;
/* 1phase access: Check if we didn't yet send any data, or whether
* either T3164 or T3166 are active: */
if (ul_tbf->ul_ass_fsm.ass_type == GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE)
return (ul_tbf->n3104 == 0) ||
(osmo_timer_pending(&fi->timer) && (fi->T == 3164 || fi->T == 3166));
return false;
default:
return false;
}