• Home
  • Raw
  • Download

Lines Matching refs:skb

53 	struct sk_buff *skb;  in lapb_frames_acked()  local
63 skb = skb_dequeue(&lapb->ack_queue); in lapb_frames_acked()
64 kfree_skb(skb); in lapb_frames_acked()
71 struct sk_buff *skb, *skb_prev = NULL; in lapb_requeue_frames() local
78 while ((skb = skb_dequeue(&lapb->ack_queue)) != NULL) { in lapb_requeue_frames()
80 skb_queue_head(&lapb->write_queue, skb); in lapb_requeue_frames()
82 skb_append(skb_prev, skb, &lapb->write_queue); in lapb_requeue_frames()
83 skb_prev = skb; in lapb_requeue_frames()
111 int lapb_decode(struct lapb_cb *lapb, struct sk_buff *skb, in lapb_decode() argument
118 skb->data[0], skb->data[1], skb->data[2]); in lapb_decode()
123 if (!pskb_may_pull(skb, 2)) in lapb_decode()
128 if (skb->data[0] == LAPB_ADDR_D) in lapb_decode()
130 if (skb->data[0] == LAPB_ADDR_C) in lapb_decode()
133 if (skb->data[0] == LAPB_ADDR_C) in lapb_decode()
135 if (skb->data[0] == LAPB_ADDR_D) in lapb_decode()
140 if (skb->data[0] == LAPB_ADDR_B) in lapb_decode()
142 if (skb->data[0] == LAPB_ADDR_A) in lapb_decode()
145 if (skb->data[0] == LAPB_ADDR_A) in lapb_decode()
147 if (skb->data[0] == LAPB_ADDR_B) in lapb_decode()
152 skb_pull(skb, 1); in lapb_decode()
155 if (!(skb->data[0] & LAPB_S)) { in lapb_decode()
156 if (!pskb_may_pull(skb, 2)) in lapb_decode()
162 frame->ns = (skb->data[0] >> 1) & 0x7F; in lapb_decode()
163 frame->nr = (skb->data[1] >> 1) & 0x7F; in lapb_decode()
164 frame->pf = skb->data[1] & LAPB_EPF; in lapb_decode()
165 frame->control[0] = skb->data[0]; in lapb_decode()
166 frame->control[1] = skb->data[1]; in lapb_decode()
167 skb_pull(skb, 2); in lapb_decode()
168 } else if ((skb->data[0] & LAPB_U) == 1) { in lapb_decode()
169 if (!pskb_may_pull(skb, 2)) in lapb_decode()
174 frame->type = skb->data[0] & 0x0F; in lapb_decode()
175 frame->nr = (skb->data[1] >> 1) & 0x7F; in lapb_decode()
176 frame->pf = skb->data[1] & LAPB_EPF; in lapb_decode()
177 frame->control[0] = skb->data[0]; in lapb_decode()
178 frame->control[1] = skb->data[1]; in lapb_decode()
179 skb_pull(skb, 2); in lapb_decode()
180 } else if ((skb->data[0] & LAPB_U) == 3) { in lapb_decode()
184 frame->type = skb->data[0] & ~LAPB_SPF; in lapb_decode()
185 frame->pf = skb->data[0] & LAPB_SPF; in lapb_decode()
186 frame->control[0] = skb->data[0]; in lapb_decode()
188 skb_pull(skb, 1); in lapb_decode()
191 if (!(skb->data[0] & LAPB_S)) { in lapb_decode()
196 frame->ns = (skb->data[0] >> 1) & 0x07; 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) == 1) { in lapb_decode()
203 frame->type = skb->data[0] & 0x0F; in lapb_decode()
204 frame->nr = (skb->data[0] >> 5) & 0x07; in lapb_decode()
205 frame->pf = skb->data[0] & LAPB_SPF; in lapb_decode()
206 } else if ((skb->data[0] & LAPB_U) == 3) { in lapb_decode()
210 frame->type = skb->data[0] & ~LAPB_SPF; in lapb_decode()
211 frame->pf = skb->data[0] & LAPB_SPF; in lapb_decode()
214 frame->control[0] = skb->data[0]; in lapb_decode()
216 skb_pull(skb, 1); in lapb_decode()
231 struct sk_buff *skb; in lapb_send_control() local
234 if ((skb = alloc_skb(LAPB_HEADER_LEN + 3, GFP_ATOMIC)) == NULL) in lapb_send_control()
237 skb_reserve(skb, LAPB_HEADER_LEN + 1); in lapb_send_control()
241 dptr = skb_put(skb, 1); in lapb_send_control()
245 dptr = skb_put(skb, 2); in lapb_send_control()
251 dptr = skb_put(skb, 1); in lapb_send_control()
258 lapb_transmit_buffer(lapb, skb, type); in lapb_send_control()
267 struct sk_buff *skb; in lapb_transmit_frmr() local
270 if ((skb = alloc_skb(LAPB_HEADER_LEN + 7, GFP_ATOMIC)) == NULL) in lapb_transmit_frmr()
273 skb_reserve(skb, LAPB_HEADER_LEN + 1); in lapb_transmit_frmr()
276 dptr = skb_put(skb, 6); in lapb_transmit_frmr()
289 skb->data[1], skb->data[2], skb->data[3], in lapb_transmit_frmr()
290 skb->data[4], skb->data[5]); in lapb_transmit_frmr()
292 dptr = skb_put(skb, 4); in lapb_transmit_frmr()
303 lapb->dev, lapb->state, skb->data[1], in lapb_transmit_frmr()
304 skb->data[2], skb->data[3]); in lapb_transmit_frmr()
307 lapb_transmit_buffer(lapb, skb, LAPB_RESPONSE); in lapb_transmit_frmr()