Lines Matching refs:rcv
340 struct plip_local *rcv,
349 struct plip_local *snd, struct plip_local *rcv);
366 struct plip_local *rcv = &nl->rcv_data; in plip_bh() local
372 if ((r = (*f)(nl->dev, nl, snd, rcv)) != OK && in plip_bh()
373 (r = plip_bh_timeout_error(nl->dev, nl, snd, rcv, r)) != OK) { in plip_bh()
397 struct plip_local *snd, struct plip_local *rcv, in plip_bh_timeout_error() argument
430 if (rcv->state == PLIP_PK_TRIGGER) { in plip_bh_timeout_error()
443 dev->name, rcv->state, c0); in plip_bh_timeout_error()
447 rcv->state = PLIP_PK_DONE; in plip_bh_timeout_error()
448 if (rcv->skb) { in plip_bh_timeout_error()
449 dev_kfree_skb_irq(rcv->skb); in plip_bh_timeout_error()
450 rcv->skb = NULL; in plip_bh_timeout_error()
472 struct plip_local *snd, struct plip_local *rcv) in plip_none() argument
585 struct plip_local *snd, struct plip_local *rcv) in plip_receive_packet() argument
590 switch (rcv->state) { in plip_receive_packet()
598 rcv->state = PLIP_PK_LENGTH_LSB; in plip_receive_packet()
599 rcv->nibble = PLIP_NB_BEGIN; in plip_receive_packet()
605 &rcv->nibble, &rcv->length.b.lsb)) { in plip_receive_packet()
607 rcv->state = PLIP_PK_DONE; in plip_receive_packet()
617 &rcv->nibble, &rcv->length.b.lsb)) in plip_receive_packet()
620 rcv->state = PLIP_PK_LENGTH_MSB; in plip_receive_packet()
625 &rcv->nibble, &rcv->length.b.msb)) in plip_receive_packet()
627 if (rcv->length.h > dev->mtu + dev->hard_header_len || in plip_receive_packet()
628 rcv->length.h < 8) { in plip_receive_packet()
629 printk(KERN_WARNING "%s: bogus packet size %d.\n", dev->name, rcv->length.h); in plip_receive_packet()
633 rcv->skb = dev_alloc_skb(rcv->length.h + 2); in plip_receive_packet()
634 if (rcv->skb == NULL) { in plip_receive_packet()
638 skb_reserve(rcv->skb, 2); /* Align IP on 16 byte boundaries */ in plip_receive_packet()
639 skb_put(rcv->skb,rcv->length.h); in plip_receive_packet()
640 rcv->skb->dev = dev; in plip_receive_packet()
641 rcv->state = PLIP_PK_DATA; in plip_receive_packet()
642 rcv->byte = 0; in plip_receive_packet()
643 rcv->checksum = 0; in plip_receive_packet()
647 lbuf = rcv->skb->data; in plip_receive_packet()
650 &rcv->nibble, &lbuf[rcv->byte])) in plip_receive_packet()
652 } while (++rcv->byte < rcv->length.h); in plip_receive_packet()
654 rcv->checksum += lbuf[--rcv->byte]; in plip_receive_packet()
655 } while (rcv->byte); in plip_receive_packet()
656 rcv->state = PLIP_PK_CHECKSUM; in plip_receive_packet()
661 &rcv->nibble, &rcv->data)) in plip_receive_packet()
663 if (rcv->data != rcv->checksum) { in plip_receive_packet()
669 rcv->state = PLIP_PK_DONE; in plip_receive_packet()
674 rcv->skb->protocol=plip_type_trans(rcv->skb, dev); in plip_receive_packet()
675 netif_rx_ni(rcv->skb); in plip_receive_packet()
676 dev->stats.rx_bytes += rcv->length.h; in plip_receive_packet()
678 rcv->skb = NULL; in plip_receive_packet()
753 struct plip_local *snd, struct plip_local *rcv) in plip_send_packet() argument
873 struct plip_local *snd, struct plip_local *rcv) in plip_connection_close() argument
891 struct plip_local *snd, struct plip_local *rcv) in plip_error() argument
919 struct plip_local *rcv; in plip_interrupt() local
924 rcv = &nl->rcv_data; in plip_interrupt()
945 rcv->state = PLIP_PK_TRIGGER; in plip_interrupt()
1127 struct plip_local *rcv = &nl->rcv_data; in plip_close() local
1155 rcv->state = PLIP_PK_DONE; in plip_close()
1156 if (rcv->skb) { in plip_close()
1157 kfree_skb(rcv->skb); in plip_close()
1158 rcv->skb = NULL; in plip_close()