/* store skb to cleanup */
priv->tx_skb[j] = skb;
+ netdev_sent_queue(dev, skb->len);
+ skb_tx_timestamp(skb);
+
wmb();
j = NEXT_TX_DESP_IDX(j);
fe_reg_w32(j, FE_REG_TX_CTX_IDX0);
struct net_device_stats *stats = &dev->stats;
u32 tx;
int tx_num;
+ int len = skb->len;
if (fe_skb_padto(skb, priv)) {
netif_warn(priv, tx_err, dev, "tx padding failed!\n");
stats->tx_dropped++;
} else {
- netdev_sent_queue(dev, skb->len);
- skb_tx_timestamp(skb);
-
stats->tx_packets++;
- stats->tx_bytes += skb->len;
+ stats->tx_bytes += len;
}
spin_unlock(&priv->page_lock);