Allocate headroom for TR_HLEN but using only ETH_HLEN causes rx
performance degradation. Allocate ETH_HLEN for ethernet and
TR_HLEN for token ring (layer 3 mode).
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
}
} else {
skb_len = (*hdr)->hdr.l3.length;
- headroom = max((int)ETH_HLEN, (int)TR_HLEN);
+ if ((card->info.link_type == QETH_LINK_TYPE_LANE_TR) ||
+ (card->info.link_type == QETH_LINK_TYPE_HSTR))
+ headroom = TR_HLEN;
+ else
+ headroom = ETH_HLEN;
}
if (!skb_len)