Lines Matching full:length
40 struct archdr *pkthdr, int length) in rx() argument
47 arc_printk(D_DURING, dev, "it's a raw packet (length=%d)\n", length); in rx()
49 if (length > MTU) in rx()
50 ofs = 512 - length; in rx()
52 ofs = 256 - length; in rx()
54 skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC); in rx()
59 skb_put(skb, length + ARC_HDR_SIZE); in rx()
69 if (length > sizeof(pkt->soft)) in rx()
72 length - sizeof(pkt->soft)); in rx()
113 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, in prepare_tx() argument
123 /* hard header is not included in packet length */ in prepare_tx()
124 length -= ARC_HDR_SIZE; in prepare_tx()
126 if (length > XMTU) { in prepare_tx()
129 length, XMTU); in prepare_tx()
130 length = XMTU; in prepare_tx()
132 if (length >= MinTU) { in prepare_tx()
134 hard->offset[1] = ofs = 512 - length; in prepare_tx()
135 } else if (length > MTU) { in prepare_tx()
137 hard->offset[1] = ofs = 512 - length - 3; in prepare_tx()
139 hard->offset[0] = ofs = 256 - length; in prepare_tx()
142 arc_printk(D_DURING, dev, "prepare_tx: length=%d ofs=%d\n", in prepare_tx()
143 length, ofs); in prepare_tx()
146 lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft, length); in prepare_tx()