aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-05-30 21:51:58 +0200
committerHarald Welte <laforge@gnumonks.org>2010-05-30 22:00:42 +0200
commit6bdee6ada3f75e6e64ae311fae2716376ddd0016 (patch)
treea24c35fbb5fb6aafbed6b0235c8011edbeac611f /openbsc
parentb12aa4b1eebe1024a0cf09553a8448420b707c89 (diff)
[GPRS] LLC: Increment V(U) and N(U)
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/gprs_llc.h9
-rw-r--r--openbsc/src/gprs/gprs_llc.c4
2 files changed, 10 insertions, 3 deletions
diff --git a/openbsc/include/openbsc/gprs_llc.h b/openbsc/include/openbsc/gprs_llc.h
index 21ebaa25d..4828a8fe9 100644
--- a/openbsc/include/openbsc/gprs_llc.h
+++ b/openbsc/include/openbsc/gprs_llc.h
@@ -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;
diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c
index 293c6579d..68d7d7654 100644
--- a/openbsc/src/gprs/gprs_llc.c
+++ b/openbsc/src/gprs/gprs_llc.c
@@ -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)