Lines Matching full:rcv
344 struct plip_local *rcv,
353 struct plip_local *snd, struct plip_local *rcv);
370 struct plip_local *rcv = &nl->rcv_data; in plip_bh() local
376 if ((r = (*f)(nl->dev, nl, snd, rcv)) != OK && in plip_bh()
377 (r = plip_bh_timeout_error(nl->dev, nl, snd, rcv, r)) != OK) { in plip_bh()
401 struct plip_local *snd, struct plip_local *rcv, in plip_bh_timeout_error() argument
434 if (rcv->state == PLIP_PK_TRIGGER) { in plip_bh_timeout_error()
447 dev->name, rcv->state, c0); in plip_bh_timeout_error()
451 rcv->state = PLIP_PK_DONE; in plip_bh_timeout_error()
452 if (rcv->skb) { in plip_bh_timeout_error()
453 dev_kfree_skb_irq(rcv->skb); in plip_bh_timeout_error()
454 rcv->skb = NULL; in plip_bh_timeout_error()
476 struct plip_local *snd, struct plip_local *rcv) in plip_none() argument
589 struct plip_local *snd, struct plip_local *rcv) in plip_receive_packet() argument
594 switch (rcv->state) { in plip_receive_packet()
602 rcv->state = PLIP_PK_LENGTH_LSB; in plip_receive_packet()
603 rcv->nibble = PLIP_NB_BEGIN; in plip_receive_packet()
609 &rcv->nibble, &rcv->length.b.lsb)) { in plip_receive_packet()
611 rcv->state = PLIP_PK_DONE; in plip_receive_packet()
621 &rcv->nibble, &rcv->length.b.lsb)) in plip_receive_packet()
624 rcv->state = PLIP_PK_LENGTH_MSB; in plip_receive_packet()
629 &rcv->nibble, &rcv->length.b.msb)) in plip_receive_packet()
631 if (rcv->length.h > dev->mtu + dev->hard_header_len || in plip_receive_packet()
632 rcv->length.h < 8) { in plip_receive_packet()
633 printk(KERN_WARNING "%s: bogus packet size %d.\n", dev->name, rcv->length.h); in plip_receive_packet()
637 rcv->skb = dev_alloc_skb(rcv->length.h + 2); in plip_receive_packet()
638 if (rcv->skb == NULL) { in plip_receive_packet()
642 skb_reserve(rcv->skb, 2); /* Align IP on 16 byte boundaries */ in plip_receive_packet()
643 skb_put(rcv->skb,rcv->length.h); in plip_receive_packet()
644 rcv->skb->dev = dev; in plip_receive_packet()
645 rcv->state = PLIP_PK_DATA; in plip_receive_packet()
646 rcv->byte = 0; in plip_receive_packet()
647 rcv->checksum = 0; in plip_receive_packet()
651 lbuf = rcv->skb->data; in plip_receive_packet()
654 &rcv->nibble, &lbuf[rcv->byte])) in plip_receive_packet()
656 } while (++rcv->byte < rcv->length.h); in plip_receive_packet()
658 rcv->checksum += lbuf[--rcv->byte]; in plip_receive_packet()
659 } while (rcv->byte); in plip_receive_packet()
660 rcv->state = PLIP_PK_CHECKSUM; in plip_receive_packet()
665 &rcv->nibble, &rcv->data)) in plip_receive_packet()
667 if (rcv->data != rcv->checksum) { in plip_receive_packet()
673 rcv->state = PLIP_PK_DONE; in plip_receive_packet()
678 rcv->skb->protocol=plip_type_trans(rcv->skb, dev); in plip_receive_packet()
679 netif_rx(rcv->skb); in plip_receive_packet()
680 dev->stats.rx_bytes += rcv->length.h; in plip_receive_packet()
682 rcv->skb = NULL; in plip_receive_packet()
757 struct plip_local *snd, struct plip_local *rcv) in plip_send_packet() argument
877 struct plip_local *snd, struct plip_local *rcv) in plip_connection_close() argument
895 struct plip_local *snd, struct plip_local *rcv) in plip_error() argument
923 struct plip_local *rcv; in plip_interrupt() local
928 rcv = &nl->rcv_data; in plip_interrupt()
949 rcv->state = PLIP_PK_TRIGGER; in plip_interrupt()
1131 struct plip_local *rcv = &nl->rcv_data; in plip_close() local
1159 rcv->state = PLIP_PK_DONE; in plip_close()
1160 if (rcv->skb) { in plip_close()
1161 kfree_skb(rcv->skb); in plip_close()
1162 rcv->skb = NULL; in plip_close()