Skip to content

Commit

Permalink
net: stmmac: don't clear network statistics in .ndo_open()
Browse files Browse the repository at this point in the history
FWICT, the common style in other network drivers: the network
statistics are not cleared since initialization, follow the common
style for stmmac.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Link: https://lore.kernel.org/r/20230717160630.1892-2-jszhang@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jisheng Zhang authored and Jakub Kicinski committed Jul 20, 2023
1 parent 567b12f commit 2eb85b7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3829,10 +3829,6 @@ static int __stmmac_open(struct net_device *dev,
}
}

/* Extra statistics */
memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats));
priv->xstats.threshold = tc;

priv->rx_copybreak = STMMAC_RX_COPYBREAK;

buf_sz = dma_conf->dma_buf_sz;
Expand Down Expand Up @@ -7322,6 +7318,8 @@ int stmmac_dvr_probe(struct device *device,
#endif
priv->msg_enable = netif_msg_init(debug, default_msg_level);

priv->xstats.threshold = tc;

/* Initialize RSS */
rxq = priv->plat->rx_queues_to_use;
netdev_rss_key_fill(priv->rss.key, sizeof(priv->rss.key));
Expand Down

0 comments on commit 2eb85b7

Please sign in to comment.