diff options
author | Alexander Duyck <alexander.h.duyck@redhat.com> | 2014-12-03 11:17:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-08 20:47:42 -0500 |
commit | 28f7936cdf7d445570b214123f45866d3f6aa836 (patch) | |
tree | 733718dbf25c2a092f0e9d9518cbab5564468e5d /drivers/net/ethernet/sun/niu.c | |
parent | 74b6939de3aea269627537e5178c973c3f123690 (diff) |
niu: Use eth_skb_pad helper
Replace the standard layout for padding an ethernet frame with the
eth_skb_pad call.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sun/niu.c')
-rw-r--r-- | drivers/net/ethernet/sun/niu.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index 904fd1ab5f6e..4aaa3240453a 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c | |||
@@ -6651,13 +6651,8 @@ static netdev_tx_t niu_start_xmit(struct sk_buff *skb, | |||
6651 | return NETDEV_TX_BUSY; | 6651 | return NETDEV_TX_BUSY; |
6652 | } | 6652 | } |
6653 | 6653 | ||
6654 | if (skb->len < ETH_ZLEN) { | 6654 | if (eth_skb_pad(skb)) |
6655 | unsigned int pad_bytes = ETH_ZLEN - skb->len; | 6655 | goto out; |
6656 | |||
6657 | if (skb_pad(skb, pad_bytes)) | ||
6658 | goto out; | ||
6659 | skb_put(skb, pad_bytes); | ||
6660 | } | ||
6661 | 6656 | ||
6662 | len = sizeof(struct tx_pkt_hdr) + 15; | 6657 | len = sizeof(struct tx_pkt_hdr) + 15; |
6663 | if (skb_headroom(skb) < len) { | 6658 | if (skb_headroom(skb) < len) { |