pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/34667?usp=email )
Change subject: rlcmac: tbf_ul_ass_fsm: Fix logic delay starting time ......................................................................
rlcmac: tbf_ul_ass_fsm: Fix logic delay starting time
The previous logic was wrongly written. We want: * If PKT UL ASS didn't have a tbf_starting_time but had an S/P+RRBP, it means we have to delay completing the FSM until we send the PKT CTRL ACK (next_blk) * If it contained tbf_starting_time, if it happens before next_blk, still wait until next_blk
Change-Id: I60cdc0315e28f71843c51eba88acc78780c6ab43 --- M src/rlcmac/tbf_ul_ass_fsm.c 1 file changed, 16 insertions(+), 2 deletions(-)
Approvals: fixeria: Looks good to me, approved; Verified Jenkins Builder: Verified
diff --git a/src/rlcmac/tbf_ul_ass_fsm.c b/src/rlcmac/tbf_ul_ass_fsm.c index 1783d5b..1c67213 100644 --- a/src/rlcmac/tbf_ul_ass_fsm.c +++ b/src/rlcmac/tbf_ul_ass_fsm.c @@ -413,7 +413,7 @@ /* We need to wait at least until sending the PKT CTRL * ACK (in the old CTRL TS) before completing the * assignment and using the new TS assignment. */ - if (!ctx->tbf_starting_time_exists && gsm0502_fncmp(ctx->tbf_starting_time, next_blk) < 0) { + if (!ctx->tbf_starting_time_exists || gsm0502_fncmp(ctx->tbf_starting_time, next_blk) < 0) { ctx->tbf_starting_time_exists = true; ctx->tbf_starting_time = next_blk; } @@ -474,7 +474,7 @@ /* We need to wait at least until sending the PKT CTRL * ACK (in the old CTRL TS) before completing the * assignment and using the new TS assignment. */ - if (!ctx->tbf_starting_time_exists && gsm0502_fncmp(ctx->tbf_starting_time, next_blk) < 0) { + if (!ctx->tbf_starting_time_exists || gsm0502_fncmp(ctx->tbf_starting_time, next_blk) < 0) { ctx->tbf_starting_time_exists = true; ctx->tbf_starting_time = next_blk; }