Lines Matching refs:length
39 struct archdr *pkthdr, int length);
42 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
93 struct archdr *pkthdr, int length) in rx() argument
100 BUGMSG(D_DURING, "it's a raw packet (length=%d)\n", length); in rx()
102 if (length >= MinTU) in rx()
103 ofs = 512 - length; in rx()
105 ofs = 256 - length; in rx()
107 skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC); in rx()
113 skb_put(skb, length + ARC_HDR_SIZE); in rx()
123 if (length > sizeof(pkt->soft)) in rx()
126 length - sizeof(pkt->soft)); in rx()
172 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, in prepare_tx() argument
182 length -= ARC_HDR_SIZE; /* hard header is not included in packet length */ in prepare_tx()
184 if (length > XMTU) { in prepare_tx()
187 length, XMTU); in prepare_tx()
188 length = XMTU; in prepare_tx()
190 if (length > MinTU) { in prepare_tx()
192 hard->offset[1] = ofs = 512 - length; in prepare_tx()
193 } else if (length > MTU) { in prepare_tx()
195 hard->offset[1] = ofs = 512 - length - 3; in prepare_tx()
197 hard->offset[0] = ofs = 256 - length; in prepare_tx()
200 lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft, length); in prepare_tx()