Lines Matching full:rcv

338 				 struct plip_local *rcv,
347 struct plip_local *snd, struct plip_local *rcv);
364 struct plip_local *rcv = &nl->rcv_data; in plip_bh() local
370 if ((r = (*f)(nl->dev, nl, snd, rcv)) != OK && in plip_bh()
371 (r = plip_bh_timeout_error(nl->dev, nl, snd, rcv, r)) != OK) { in plip_bh()
395 struct plip_local *snd, struct plip_local *rcv, in plip_bh_timeout_error() argument
428 if (rcv->state == PLIP_PK_TRIGGER) { in plip_bh_timeout_error()
441 dev->name, rcv->state, c0); in plip_bh_timeout_error()
445 rcv->state = PLIP_PK_DONE; in plip_bh_timeout_error()
446 if (rcv->skb) { in plip_bh_timeout_error()
447 kfree_skb(rcv->skb); in plip_bh_timeout_error()
448 rcv->skb = NULL; in plip_bh_timeout_error()
470 struct plip_local *snd, struct plip_local *rcv) in plip_none() argument
582 struct plip_local *snd, struct plip_local *rcv) in plip_receive_packet() argument
587 switch (rcv->state) { in plip_receive_packet()
595 rcv->state = PLIP_PK_LENGTH_LSB; in plip_receive_packet()
596 rcv->nibble = PLIP_NB_BEGIN; in plip_receive_packet()
602 &rcv->nibble, &rcv->length.b.lsb)) { in plip_receive_packet()
604 rcv->state = PLIP_PK_DONE; in plip_receive_packet()
614 &rcv->nibble, &rcv->length.b.lsb)) in plip_receive_packet()
617 rcv->state = PLIP_PK_LENGTH_MSB; in plip_receive_packet()
622 &rcv->nibble, &rcv->length.b.msb)) in plip_receive_packet()
624 if (rcv->length.h > dev->mtu + dev->hard_header_len || in plip_receive_packet()
625 rcv->length.h < 8) { in plip_receive_packet()
626 printk(KERN_WARNING "%s: bogus packet size %d.\n", dev->name, rcv->length.h); in plip_receive_packet()
630 rcv->skb = dev_alloc_skb(rcv->length.h + 2); in plip_receive_packet()
631 if (rcv->skb == NULL) { in plip_receive_packet()
635 skb_reserve(rcv->skb, 2); /* Align IP on 16 byte boundaries */ in plip_receive_packet()
636 skb_put(rcv->skb,rcv->length.h); in plip_receive_packet()
637 rcv->skb->dev = dev; in plip_receive_packet()
638 rcv->state = PLIP_PK_DATA; in plip_receive_packet()
639 rcv->byte = 0; in plip_receive_packet()
640 rcv->checksum = 0; in plip_receive_packet()
644 lbuf = rcv->skb->data; in plip_receive_packet()
647 &rcv->nibble, &lbuf[rcv->byte])) in plip_receive_packet()
649 } while (++rcv->byte < rcv->length.h); in plip_receive_packet()
651 rcv->checksum += lbuf[--rcv->byte]; in plip_receive_packet()
652 } while (rcv->byte); in plip_receive_packet()
653 rcv->state = PLIP_PK_CHECKSUM; in plip_receive_packet()
658 &rcv->nibble, &rcv->data)) in plip_receive_packet()
660 if (rcv->data != rcv->checksum) { in plip_receive_packet()
666 rcv->state = PLIP_PK_DONE; in plip_receive_packet()
671 rcv->skb->protocol=plip_type_trans(rcv->skb, dev); in plip_receive_packet()
672 netif_rx_ni(rcv->skb); in plip_receive_packet()
673 dev->stats.rx_bytes += rcv->length.h; in plip_receive_packet()
675 rcv->skb = NULL; in plip_receive_packet()
750 struct plip_local *snd, struct plip_local *rcv) in plip_send_packet() argument
869 struct plip_local *snd, struct plip_local *rcv) in plip_connection_close() argument
887 struct plip_local *snd, struct plip_local *rcv) in plip_error() argument
915 struct plip_local *rcv; in plip_interrupt() local
920 rcv = &nl->rcv_data; in plip_interrupt()
941 rcv->state = PLIP_PK_TRIGGER; in plip_interrupt()
1123 struct plip_local *rcv = &nl->rcv_data; in plip_close() local
1151 rcv->state = PLIP_PK_DONE; in plip_close()
1152 if (rcv->skb) { in plip_close()
1153 kfree_skb(rcv->skb); in plip_close()
1154 rcv->skb = NULL; in plip_close()