pespin has uploaded this change for review.

View Change

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(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/38/31638/1
diff --git a/src/rlcmac/tbf_ul.c b/src/rlcmac/tbf_ul.c
index fbef343..dc43a77 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 change 31638. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I7d08be3d8fa584ebad98d3548c05bd1ff284ba7e
Gerrit-Change-Number: 31638
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-MessageType: newchange