Lines Matching full:length
41 struct archdr *pkthdr, int length);
44 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
122 struct archdr *pkthdr, int length) in rx() argument
129 arc_printk(D_DURING, dev, "it's a raw packet (length=%d)\n", length); in rx()
131 if (length >= MinTU) in rx()
132 ofs = 512 - length; in rx()
134 ofs = 256 - length; in rx()
136 skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC); in rx()
141 skb_put(skb, length + ARC_HDR_SIZE); in rx()
148 if (length > sizeof(pkt->soft)) in rx()
151 length - sizeof(pkt->soft)); in rx()
207 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, in prepare_tx() argument
217 /* hard header is not included in packet length */ in prepare_tx()
218 length -= ARC_HDR_SIZE; in prepare_tx()
220 if (length > XMTU) { in prepare_tx()
223 length, XMTU); in prepare_tx()
224 length = XMTU; in prepare_tx()
226 if (length > MinTU) { in prepare_tx()
228 hard->offset[1] = ofs = 512 - length; in prepare_tx()
229 } else if (length > MTU) { in prepare_tx()
231 hard->offset[1] = ofs = 512 - length - 3; in prepare_tx()
233 hard->offset[0] = ofs = 256 - length; in prepare_tx()
237 lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft, length); in prepare_tx()