projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
567b12f
)
net: stmmac: don't clear network statistics in .ndo_open()
author
Jisheng Zhang
<jszhang@kernel.org>
Mon, 17 Jul 2023 16:06:29 +0000
(
00:06
+0800)
committer
Jakub Kicinski
<kuba@kernel.org>
Thu, 20 Jul 2023 03:51:10 +0000
(20:51 -0700)
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>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index efe85b086abec68694c88dcbdd7f3c35e5c8e0a3..a29a9619b48ecef617137b8cf0d3fb37b0aec99b 100644
(file)
--- a/
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@
-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;
@@
-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));