[BSC] fix off-by-one error in computing l2 pseudo-length in IMM ASS

@fingerprint:
This caused Motorole EZX phones (Neptune LTE chipset) to discard
all immediate assigns and thus be unable to perform location updating.
This commit is contained in:
Harald Welte
2010-06-28 18:41:27 +02:00
parent 0f43dbcfc6
commit a1d39a2a11

View File

@@ -1249,7 +1249,8 @@ static int rsl_send_imm_assignment(struct gsm_lchan *lchan)
ia->mob_alloc_len = lchan->ts->hopping.ma_len;
memcpy(ia->mob_alloc, lchan->ts->hopping.ma_data, ia->mob_alloc_len);
}
ia->l2_plen = GSM48_LEN2PLEN(sizeof(*ia) + ia->mob_alloc_len);
/* we need to subtract 1 byte from sizeof(*ia) since ia includes the l2_plen field */
ia->l2_plen = GSM48_LEN2PLEN((sizeof(*ia)-1) + ia->mob_alloc_len);
/* Start timer T3101 to wait for GSM48_MT_RR_PAG_RESP */
lchan->T3101.cb = t3101_expired;