rlcmac: fix handling of TIMESLOT_ALLOCATION in handle_pkt_dl_ass()
The TIMESLOT_ALLOCATION is a timeslot mask with MSB=TS0 and LSB=TS7: 0 1 2 3 4 5 6 7 TS# in TIMESLOT_ALLOCATION 0 1 2 3 4 5 6 7 'i' value in the loop, current rshift 7 6 5 4 3 2 1 0 correct rshift in the loop (this patch) The current logic checking state of each timeslot is wrong, we actually need to shift by (7 - N) to check state of timeslot N. Change-Id: I36c52e282ee02c5136a645eb73a9631b95355c34 Related: OS#5500
This commit is contained in:
parent
4d19c93334
commit
2057567ce9
|
@ -110,7 +110,7 @@ static int handle_pkt_dl_ass(struct gprs_rlcmac_tbf_dl_ass_fsm_ctx *ctx, const s
|
|||
|
||||
ctx->alloc.num_ts = 0;
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(ctx->alloc.ts); i++) {
|
||||
ctx->alloc.ts[i].allocated = (dlass->TIMESLOT_ALLOCATION >> i) & 0x01;
|
||||
ctx->alloc.ts[i].allocated = (dlass->TIMESLOT_ALLOCATION >> (7 - i)) & 0x01;
|
||||
if (ctx->alloc.ts[i].allocated)
|
||||
ctx->alloc.num_ts++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue