Go to the documentation of this file.
16 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
18 #include <linux/errno.h>
19 #include <linux/types.h>
20 #include <linux/socket.h>
22 #include <linux/kernel.h>
24 #include <linux/string.h>
26 #include <linux/net.h>
29 #include <linux/slab.h>
31 #include <asm/uaccess.h>
32 #include <linux/fcntl.h>
65 lapb->
va = (lapb->
va + 1) % modulus;
93 unsigned short vc = lapb->
va;
98 while (vc != lapb->
vs) {
101 vc = (vc + 1) % modulus;
104 return nr == lapb->
vs;
116 lapb_dbg(2,
"(%p) S%d RX %02X %02X %02X\n",
123 if (!pskb_may_pull(skb, 2))
156 if (!pskb_may_pull(skb, 2))
162 frame->
ns = (skb->
data[0] >> 1) & 0x7F;
163 frame->
nr = (skb->
data[1] >> 1) & 0x7F;
169 if (!pskb_may_pull(skb, 2))
175 frame->
nr = (skb->
data[1] >> 1) & 0x7F;
196 frame->
ns = (skb->
data[0] >> 1) & 0x07;
197 frame->
nr = (skb->
data[0] >> 5) & 0x07;
204 frame->
nr = (skb->
data[0] >> 5) & 0x07;
229 int poll_bit,
int type)
240 if ((frametype &
LAPB_U) == LAPB_U) {
247 dptr[1] = (lapb->
vr << 1);
255 *dptr |= (lapb->
vr << 5);
280 *dptr++ = (lapb->
vs << 1) & 0xFE;
281 *dptr = (lapb->
vr << 1) & 0xFE;
287 lapb_dbg(1,
"(%p) S%d TX FRMR %02X %02X %02X %02X %02X\n",
295 *dptr = (lapb->
vs << 1) & 0x0E;
296 *dptr |= (lapb->
vr << 5) & 0xE0;
302 lapb_dbg(1,
"(%p) S%d TX FRMR %02X %02X %02X\n",