summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@redhat.com>2014-12-03 08:17:58 -0800
committerDavid S. Miller <davem@davemloft.net>2014-12-08 20:47:42 -0500
commitb0b9f33334d0c6b212b02a7cfc4a2f9910abf7ca (patch)
tree775037c873157767eb0b47a5d333b53a262d1efb /drivers
parent28f7936cdf7d445570b214123f45866d3f6aa836 (diff)
downloadop-kernel-dev-b0b9f33334d0c6b212b02a7cfc4a2f9910abf7ca.zip
op-kernel-dev-b0b9f33334d0c6b212b02a7cfc4a2f9910abf7ca.tar.gz
myri10ge: use eth_skb_pad helper
Update myri10ge to use eth_skb_pad helper. This also corrects a minor issue as the driver was updating length without updating the tail pointer. Cc: Hyong-Youb Kim <hykim@myri.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/myricom/myri10ge/myri10ge.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index 9e7e3f1..af09905 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -2913,16 +2913,11 @@ again:
flags |= MXGEFW_FLAGS_SMALL;
/* pad frames to at least ETH_ZLEN bytes */
- if (unlikely(skb->len < ETH_ZLEN)) {
- if (skb_padto(skb, ETH_ZLEN)) {
- /* The packet is gone, so we must
- * return 0 */
- ss->stats.tx_dropped += 1;
- return NETDEV_TX_OK;
- }
- /* adjust the len to account for the zero pad
- * so that the nic can know how long it is */
- skb->len = ETH_ZLEN;
+ if (eth_skb_pad(skb)) {
+ /* The packet is gone, so we must
+ * return 0 */
+ ss->stats.tx_dropped += 1;
+ return NETDEV_TX_OK;
}
}
OpenPOWER on IntegriCloud