Lines Matching full:length
43 struct archdr *pkthdr, int length) in rx() argument
51 arc_printk(D_DURING, dev, "it's a raw(cap) packet (length=%d)\n", in rx()
52 length); in rx()
54 if (length >= MinTU) in rx()
55 ofs = 512 - length; in rx()
57 ofs = 256 - length; in rx()
59 skb = alloc_skb(length + ARC_HDR_SIZE + sizeof(int), GFP_ATOMIC); in rx()
64 skb_put(skb, length + ARC_HDR_SIZE + sizeof(int)); in rx()
82 if (length > sizeof(pkt->soft)) in rx()
86 length - sizeof(pkt->soft)); in rx()
132 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, in prepare_tx() argument
139 /* hard header is not included in packet length */ in prepare_tx()
140 length -= ARC_HDR_SIZE; in prepare_tx()
142 length -= sizeof(int); in prepare_tx()
150 if (length > XMTU) { in prepare_tx()
153 length, XMTU); in prepare_tx()
154 length = XMTU; in prepare_tx()
156 if (length > MinTU) { in prepare_tx()
158 hard->offset[1] = ofs = 512 - length; in prepare_tx()
159 } else if (length > MTU) { in prepare_tx()
161 hard->offset[1] = ofs = 512 - length - 3; in prepare_tx()
163 hard->offset[0] = ofs = 256 - length; in prepare_tx()
166 arc_printk(D_DURING, dev, "prepare_tx: length=%d ofs=%d\n", in prepare_tx()
167 length, ofs); in prepare_tx()
178 ((unsigned char *)&pkt->soft.cap.mes), length - 1); in prepare_tx()
190 int length = sizeof(struct arc_cap); in ack_tx() local
199 ackskb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC); in ack_tx()
203 skb_put(ackskb, length + ARC_HDR_SIZE); in ack_tx()