aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/input/lapd.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/input/lapd.c')
-rw-r--r--openbsc/src/input/lapd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/openbsc/src/input/lapd.c b/openbsc/src/input/lapd.c
index de0d5a546..8aa71e2f5 100644
--- a/openbsc/src/input/lapd.c
+++ b/openbsc/src/input/lapd.c
@@ -97,7 +97,6 @@ struct lapd_tei {
struct llist_head list;
uint8_t tei;
- uint8_t sapi;
/* A valid N(R) value is one that is in the range V(A) ≤ N(R) ≤ V(S). */
int vs; /* next to be transmitted */
int va; /* last acked by peer */
@@ -456,7 +455,7 @@ uint8_t *lapd_receive(struct lapd_instance *li, uint8_t * data, unsigned int len
return NULL;
};
-void lapd_transmit(struct lapd_instance *li, uint8_t tei,
+void lapd_transmit(struct lapd_instance *li, uint8_t tei, uint8_t sapi,
uint8_t *data, unsigned int len)
{
//printf("lapd_transmit %d, %d\n", tei, len);
@@ -475,8 +474,8 @@ void lapd_transmit(struct lapd_instance *li, uint8_t tei,
memmove(buf + 4, data, len);
len += 4;
- buf[0] = (teip->sapi << 2) | (li->network_side ? 2 : 0);
- buf[1] = (teip->tei << 1) | 1;
+ buf[0] = (sapi << 2) | (li->network_side ? 2 : 0);
+ buf[1] = (tei << 1) | 1;
buf[2] = (LAPD_NS(teip) << 1);
buf[3] = (LAPD_NR(teip) << 1) | 0;