sh_eth: use ETH_ZLEN instead of home-grown #define
The driver #define's and uses ETHERSMALL macro for the minimum Ethernet frame size for which we have a standard macro ETH_ZLEN. Use the latter instead of the home-grown one. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
ca52b6647f
commit
730c8c69bc
@@ -2098,8 +2098,8 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
|
||||
skb->len + 2);
|
||||
txdesc->addr = dma_map_single(&ndev->dev, skb->data, skb->len,
|
||||
DMA_TO_DEVICE);
|
||||
if (skb->len < ETHERSMALL)
|
||||
txdesc->buffer_length = ETHERSMALL;
|
||||
if (skb->len < ETH_ZLEN)
|
||||
txdesc->buffer_length = ETH_ZLEN;
|
||||
else
|
||||
txdesc->buffer_length = skb->len;
|
||||
|
||||
|
Reference in New Issue
Block a user