Fix TA index encoder
The TAI is described as { 0 | 1 < TIMING_ADVANCE_INDEX : bit (4) > } in 3GPP TS 44.018 §10.5.2.16.1 so it should be encoded with if-else. Change-Id: I54482790e1cf3cb13a635a99a481250576deabaf
This commit is contained in:
parent
a0353547b1
commit
02fbfc15c7
|
@ -117,13 +117,13 @@ static int write_ta_index(bitvec *dest, int8_t tai)
|
|||
{
|
||||
int rc;
|
||||
|
||||
if (tai < 0) /* No TIMING_ADVANCE_INDEX: */
|
||||
if (tai < 0) { /* No TIMING_ADVANCE_INDEX: */
|
||||
SET_0(dest);
|
||||
|
||||
/* TIMING_ADVANCE_INDEX: */
|
||||
SET_1(dest);
|
||||
rc = bitvec_set_u64(dest, tai, 4, false);
|
||||
CHECK(rc);
|
||||
} else { /* TIMING_ADVANCE_INDEX: */
|
||||
SET_1(dest);
|
||||
rc = bitvec_set_u64(dest, tai, 4, false);
|
||||
CHECK(rc);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue