Lines Matching refs:length
39 struct archdr *pkthdr, int length);
42 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
130 struct archdr *pkthdr, int length) in rx() argument
137 BUGMSG(D_DURING, "it's a raw packet (length=%d)\n", length); in rx()
139 if (length >= MinTU) in rx()
140 ofs = 512 - length; in rx()
142 ofs = 256 - length; in rx()
144 skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC); in rx()
150 skb_put(skb, length + ARC_HDR_SIZE); in rx()
157 if (length > sizeof(pkt->soft)) in rx()
160 length - sizeof(pkt->soft)); in rx()
224 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, in prepare_tx() argument
234 length -= ARC_HDR_SIZE; /* hard header is not included in packet length */ in prepare_tx()
236 if (length > XMTU) { in prepare_tx()
239 length, XMTU); in prepare_tx()
240 length = XMTU; in prepare_tx()
242 if (length > MinTU) { in prepare_tx()
244 hard->offset[1] = ofs = 512 - length; in prepare_tx()
245 } else if (length > MTU) { in prepare_tx()
247 hard->offset[1] = ofs = 512 - length - 3; in prepare_tx()
249 hard->offset[0] = ofs = 256 - length; in prepare_tx()
252 lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft, length); in prepare_tx()