projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74b6939
)
niu: Use eth_skb_pad helper
author
Alexander Duyck
<alexander.h.duyck@redhat.com>
Wed, 3 Dec 2014 16:17:52 +0000
(08:17 -0800)
committer
David S. Miller
<davem@davemloft.net>
Tue, 9 Dec 2014 01:47:42 +0000
(20:47 -0500)
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>
drivers/net/ethernet/sun/niu.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/sun/niu.c
b/drivers/net/ethernet/sun/niu.c
index 904fd1ab5f6e3762703d2931cf8fb6963c53c32c..4aaa3240453a4133e381044c4ade273ff03c8289 100644
(file)
--- 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,
return NETDEV_TX_BUSY;
}
- if (skb->len < ETH_ZLEN) {
- unsigned int pad_bytes = ETH_ZLEN - skb->len;
-
- if (skb_pad(skb, pad_bytes))
- goto out;
- skb_put(skb, pad_bytes);
- }
+ if (eth_skb_pad(skb))
+ goto out;
len = sizeof(struct tx_pkt_hdr) + 15;
if (skb_headroom(skb) < len) {