ethernet/intel: Use eth_skb_pad and skb_put_padto helpers
[deliverable/linux.git] / drivers / net / ethernet / intel / e1000 / e1000_main.c
index 24f3986cfae2950f582d3a5e4644c4e1b666391e..862d1989ae1c4adc9ca61d2dfa4ae7a1d213f707 100644 (file)
@@ -3136,12 +3136,8 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
         * packets may get corrupted during padding by HW.
         * To WA this issue, pad all small packets manually.
         */
-       if (skb->len < ETH_ZLEN) {
-               if (skb_pad(skb, ETH_ZLEN - skb->len))
-                       return NETDEV_TX_OK;
-               skb->len = ETH_ZLEN;
-               skb_set_tail_pointer(skb, ETH_ZLEN);
-       }
+       if (eth_skb_pad(skb))
+               return NETDEV_TX_OK;
 
        mss = skb_shinfo(skb)->gso_size;
        /* The controller does a simple calculation to
This page took 0.024616 seconds and 5 git commands to generate.