mirror of
https://github.com/torvalds/linux.git
synced 2026-08-02 13:22:02 +02:00
net: stmmac: move stmmac_xmit() initial variable init
Move tx_q, first_tx and txq_stats just before their first use. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1w3d0R-0000000DfM1-1itN@rmk-PC.armlinux.org.uk Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
7b86831150
commit
2e3bfeb1bc
|
|
@ -4685,10 +4685,6 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
dma_addr_t dma_addr;
|
||||
u32 sdu_len;
|
||||
|
||||
tx_q = &priv->dma_conf.tx_queue[queue];
|
||||
txq_stats = &priv->xstats.txq_stats[queue];
|
||||
first_tx = tx_q->cur_tx;
|
||||
|
||||
if (priv->tx_path_in_lpi_mode && priv->eee_sw_timer_en)
|
||||
stmmac_stop_sw_lpi(priv);
|
||||
|
||||
|
|
@ -4725,6 +4721,9 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
return NETDEV_TX_BUSY;
|
||||
}
|
||||
|
||||
tx_q = &priv->dma_conf.tx_queue[queue];
|
||||
first_tx = tx_q->cur_tx;
|
||||
|
||||
/* Check if VLAN can be inserted by HW */
|
||||
has_vlan = stmmac_vlan_insert(priv, skb, tx_q);
|
||||
|
||||
|
|
@ -4882,6 +4881,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
netif_tx_stop_queue(netdev_get_tx_queue(priv->dev, queue));
|
||||
}
|
||||
|
||||
txq_stats = &priv->xstats.txq_stats[queue];
|
||||
u64_stats_update_begin(&txq_stats->q_syncp);
|
||||
u64_stats_add(&txq_stats->q.tx_bytes, skb->len);
|
||||
if (set_ic)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user