[GPRS] LLC: Increment V(U) and N(U)

This commit is contained in:
Harald Welte 2010-05-30 21:51:58 +02:00
parent b12aa4b1ee
commit 6bdee6ada3
2 changed files with 10 additions and 3 deletions

View File

@ -82,9 +82,12 @@ struct gprs_llc_lle {
uint32_t tlli;
uint32_t sapi;
uint8_t v_sent;
uint8_t v_ack;
uint8_t v_recv;
uint16_t v_sent;
uint16_t v_ack;
uint16_t v_recv;
uint16_t vu_send;
uint16_t vu_recv;
unsigned int n200;
unsigned int retrans_ctr;

View File

@ -230,6 +230,10 @@ int gprs_llc_tx_ui(struct msgb *msg, uint8_t sapi, int command)
lle->bvci = msgb_bvci(msg);
lle->nsei = msgb_nsei(msg);
/* Increment V(U) */
nu = lle->vu_send;
lle->vu_send = (lle->vu_send + 1) % 512;
/* Address Field */
addr = sapi & 0xf;
if (command)