Lines Matching refs:skb
48 struct sk_buff *skb; in lapb_frames_acked() local
58 skb = skb_dequeue(&lapb->ack_queue); in lapb_frames_acked()
59 kfree_skb(skb); in lapb_frames_acked()
66 struct sk_buff *skb, *skb_prev = NULL; in lapb_requeue_frames() local
73 while ((skb = skb_dequeue(&lapb->ack_queue)) != NULL) { in lapb_requeue_frames()
75 skb_queue_head(&lapb->write_queue, skb); in lapb_requeue_frames()
77 skb_append(skb_prev, skb, &lapb->write_queue); in lapb_requeue_frames()
78 skb_prev = skb; in lapb_requeue_frames()
106 int lapb_decode(struct lapb_cb *lapb, struct sk_buff *skb, in lapb_decode() argument
111 lapb_dbg(2, "(%p) S%d RX %3ph\n", lapb->dev, lapb->state, skb->data); in lapb_decode()
116 if (!pskb_may_pull(skb, 2)) in lapb_decode()
121 if (skb->data[0] == LAPB_ADDR_D) in lapb_decode()
123 if (skb->data[0] == LAPB_ADDR_C) in lapb_decode()
126 if (skb->data[0] == LAPB_ADDR_C) in lapb_decode()
128 if (skb->data[0] == LAPB_ADDR_D) in lapb_decode()
133 if (skb->data[0] == LAPB_ADDR_B) in lapb_decode()
135 if (skb->data[0] == LAPB_ADDR_A) in lapb_decode()
138 if (skb->data[0] == LAPB_ADDR_A) in lapb_decode()
140 if (skb->data[0] == LAPB_ADDR_B) in lapb_decode()
145 skb_pull(skb, 1); in lapb_decode()
148 if (!(skb->data[0] & LAPB_S)) { in lapb_decode()
149 if (!pskb_may_pull(skb, 2)) in lapb_decode()
155 frame->ns = (skb->data[0] >> 1) & 0x7F; in lapb_decode()
156 frame->nr = (skb->data[1] >> 1) & 0x7F; in lapb_decode()
157 frame->pf = skb->data[1] & LAPB_EPF; in lapb_decode()
158 frame->control[0] = skb->data[0]; in lapb_decode()
159 frame->control[1] = skb->data[1]; in lapb_decode()
160 skb_pull(skb, 2); in lapb_decode()
161 } else if ((skb->data[0] & LAPB_U) == 1) { in lapb_decode()
162 if (!pskb_may_pull(skb, 2)) in lapb_decode()
167 frame->type = skb->data[0] & 0x0F; in lapb_decode()
168 frame->nr = (skb->data[1] >> 1) & 0x7F; in lapb_decode()
169 frame->pf = skb->data[1] & LAPB_EPF; in lapb_decode()
170 frame->control[0] = skb->data[0]; in lapb_decode()
171 frame->control[1] = skb->data[1]; in lapb_decode()
172 skb_pull(skb, 2); in lapb_decode()
173 } else if ((skb->data[0] & LAPB_U) == 3) { in lapb_decode()
177 frame->type = skb->data[0] & ~LAPB_SPF; in lapb_decode()
178 frame->pf = skb->data[0] & LAPB_SPF; in lapb_decode()
179 frame->control[0] = skb->data[0]; in lapb_decode()
181 skb_pull(skb, 1); in lapb_decode()
184 if (!(skb->data[0] & LAPB_S)) { in lapb_decode()
189 frame->ns = (skb->data[0] >> 1) & 0x07; in lapb_decode()
190 frame->nr = (skb->data[0] >> 5) & 0x07; in lapb_decode()
191 frame->pf = skb->data[0] & LAPB_SPF; in lapb_decode()
192 } else if ((skb->data[0] & LAPB_U) == 1) { in lapb_decode()
196 frame->type = skb->data[0] & 0x0F; in lapb_decode()
197 frame->nr = (skb->data[0] >> 5) & 0x07; in lapb_decode()
198 frame->pf = skb->data[0] & LAPB_SPF; in lapb_decode()
199 } else if ((skb->data[0] & LAPB_U) == 3) { in lapb_decode()
203 frame->type = skb->data[0] & ~LAPB_SPF; in lapb_decode()
204 frame->pf = skb->data[0] & LAPB_SPF; in lapb_decode()
207 frame->control[0] = skb->data[0]; in lapb_decode()
209 skb_pull(skb, 1); in lapb_decode()
224 struct sk_buff *skb; in lapb_send_control() local
227 if ((skb = alloc_skb(LAPB_HEADER_LEN + 3, GFP_ATOMIC)) == NULL) in lapb_send_control()
230 skb_reserve(skb, LAPB_HEADER_LEN + 1); in lapb_send_control()
234 dptr = skb_put(skb, 1); in lapb_send_control()
238 dptr = skb_put(skb, 2); in lapb_send_control()
244 dptr = skb_put(skb, 1); in lapb_send_control()
251 lapb_transmit_buffer(lapb, skb, type); in lapb_send_control()
260 struct sk_buff *skb; in lapb_transmit_frmr() local
263 if ((skb = alloc_skb(LAPB_HEADER_LEN + 7, GFP_ATOMIC)) == NULL) in lapb_transmit_frmr()
266 skb_reserve(skb, LAPB_HEADER_LEN + 1); in lapb_transmit_frmr()
269 dptr = skb_put(skb, 6); in lapb_transmit_frmr()
282 &skb->data[1]); in lapb_transmit_frmr()
284 dptr = skb_put(skb, 4); in lapb_transmit_frmr()
295 lapb->dev, lapb->state, &skb->data[1]); in lapb_transmit_frmr()
298 lapb_transmit_buffer(lapb, skb, LAPB_RESPONSE); in lapb_transmit_frmr()