1 --- a/drivers/net/ethernet/marvell/mvneta.c
2 +++ b/drivers/net/ethernet/marvell/mvneta.c
3 @@ -1720,8 +1720,10 @@ static struct mvneta_tx_queue *mvneta_tx
5 /* Free tx queue skbuffs */
6 static void mvneta_txq_bufs_free(struct mvneta_port *pp,
7 - struct mvneta_tx_queue *txq, int num)
8 + struct mvneta_tx_queue *txq, int num,
9 + struct netdev_queue *nq)
11 + unsigned int bytes_compl = 0, pkts_compl = 0;
14 for (i = 0; i < num; i++) {
15 @@ -1729,6 +1731,11 @@ static void mvneta_txq_bufs_free(struct
17 struct sk_buff *skb = txq->tx_skb[txq->txq_get_index];
20 + bytes_compl += skb->len;
24 mvneta_txq_inc_get(txq);
26 if (!IS_TSO_HEADER(txq, tx_desc->buf_phys_addr))
27 @@ -1739,6 +1746,8 @@ static void mvneta_txq_bufs_free(struct
29 dev_kfree_skb_any(skb);
32 + netdev_tx_completed_queue(nq, pkts_compl, bytes_compl);
35 /* Handle end of transmission */
36 @@ -1752,7 +1761,7 @@ static void mvneta_txq_done(struct mvnet
40 - mvneta_txq_bufs_free(pp, txq, tx_done);
41 + mvneta_txq_bufs_free(pp, txq, tx_done, nq);
43 txq->count -= tx_done;
45 @@ -2359,6 +2368,8 @@ out:
46 struct mvneta_pcpu_stats *stats = this_cpu_ptr(pp->stats);
47 struct netdev_queue *nq = netdev_get_tx_queue(dev, txq_id);
49 + netdev_tx_sent_queue(nq, len);
52 mvneta_txq_pend_desc_add(pp, txq, frags);
54 @@ -2383,9 +2394,10 @@ static void mvneta_txq_done_force(struct
55 struct mvneta_tx_queue *txq)
58 + struct netdev_queue *nq = netdev_get_tx_queue(pp->dev, txq->id);
59 int tx_done = txq->count;
61 - mvneta_txq_bufs_free(pp, txq, tx_done);
62 + mvneta_txq_bufs_free(pp, txq, tx_done, nq);
66 @@ -2881,6 +2893,8 @@ static int mvneta_txq_init(struct mvneta
67 static void mvneta_txq_deinit(struct mvneta_port *pp,
68 struct mvneta_tx_queue *txq)
70 + struct netdev_queue *nq = netdev_get_tx_queue(pp->dev, txq->id);
75 @@ -2892,6 +2906,8 @@ static void mvneta_txq_deinit(struct mvn
76 txq->size * MVNETA_DESC_ALIGNED_SIZE,
77 txq->descs, txq->descs_phys);
79 + netdev_tx_reset_queue(nq);
83 txq->next_desc_to_proc = 0;