Skip to content

Commit 2eb85b7

Browse files
xhackerustckuba-moo
authored andcommitted
net: stmmac: don't clear network statistics in .ndo_open()
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 567b12f commit 2eb85b7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3829,10 +3829,6 @@ static int __stmmac_open(struct net_device *dev,
38293829
}
38303830
}
38313831

3832-
/* Extra statistics */
3833-
memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats));
3834-
priv->xstats.threshold = tc;
3835-
38363832
priv->rx_copybreak = STMMAC_RX_COPYBREAK;
38373833

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

7321+
priv->xstats.threshold = tc;
7322+
73257323
/* Initialize RSS */
73267324
rxq = priv->plat->rx_queues_to_use;
73277325
netdev_rss_key_fill(priv->rss.key, sizeof(priv->rss.key));

0 commit comments

Comments
 (0)