pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-gprs/+/31638 )

Change subject: rlcmac: Fix gprs_rlcmac_ul_tbf_in_contention_resolution() for 
1phase access
......................................................................

rlcmac: Fix gprs_rlcmac_ul_tbf_in_contention_resolution() for 1phase access

Change-Id: I7d08be3d8fa584ebad98d3548c05bd1ff284ba7e
---
M src/rlcmac/tbf_ul.c
1 file changed, 17 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved




diff --git a/src/rlcmac/tbf_ul.c b/src/rlcmac/tbf_ul.c
index fbef343..20653f2 100644
--- a/src/rlcmac/tbf_ul.c
+++ b/src/rlcmac/tbf_ul.c
@@ -103,10 +103,14 @@
                /* 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;
        }

--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31638
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I7d08be3d8fa584ebad98d3548c05bd1ff284ba7e
Gerrit-Change-Number: 31638
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-CC: fixeria <[email protected]>
Gerrit-MessageType: merged

Reply via email to