|
@@ -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;
|
|
|
}
|
|
|
}
|
|
|
|