- if(!(nackInfo->nackRange))
- {
- nackInfo->nackRange++;
- }
- /* This case means there are continuous SNs/Segments. If it is the next
- * Sn then increment nackRnage. if same SN but different segment then
- * dont increment nackRange */
- if((((*prevNackSn) + 1) & AMUL.snModMask) == sn)
- {
- nackInfo->nackRange++;
- }
-
- /* If NackRange is reached to max value then increment statusPdu->nackCount*/
- if(nackInfo->nackRange == 255)
- {
- statusPdu->nackCount++;
- if(nackInfo->isSegment)
- {
- sizeToBeEncd = 1; /* return only nackRangeSize*/
- }
- else if (isSegment)
- {
- /* First SN was not segmented of this nackRange but last SN is segmented */
- sizeToBeEncd = 5; /* return size of soSatrt + soEnd + nackRnage */
- }
- }
+ sizeToBeEncd += ((AMUL.snLen == RLC_AM_CFG_12BIT_SN_LEN)?2:3); /* NACK,E1,E2 */
+ }
+ }
+ else
+ {
+ if(!(nackInfo->nackRange))
+ {
+ nackInfo->nackRange++;
+ }
+ /* This case means there are continuous SNs/Segments. If it is the next
+ * Sn then increment nackRnage. if same SN but different segment then
+ * dont increment nackRange */
+ if((((*prevNackSn) + 1) & AMUL.snModMask) == sn)
+ {
+ nackInfo->nackRange++;
+ }