2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00
linux-next/drivers/net/ethernet/freescale
Paul Gortmaker 68719786cb gianfar: remove largely unused gfar_stats struct
The gfar_stats struct is only used in copying out data
via ethtool.  It is declared as the extra stats, followed
by the rmon stats.  However, the rmon stats are never
actually ever used in the driver; instead the rmon data
is a u32 register read that is cast directly into the
ethtool buf.

It seems the only reason rmon is in the struct at all is
to give the offset(s) at which it should be exported into
the ethtool buffer.  But note gfar_stats doesn't contain
a gfar_extra_stats as a substruct -- instead it contains
a u64 array of equal element count.  This implicitly means
we have two independent declarations of what gfar_extra_stats
really is.  Rather than have this duality, we already have
defines which give us the offset directly, and hence do not
need the struct at all.

Further, since we know the extra_stats is unconditionally
always present, we can write it out to the ethtool buf
1st, and then optionally write out the rmon data.  There
is no need for two independent loops, both of which are
simply copying out the extra_stats to buf offset zero.

This also helps pave the way towards allowing the extra
stats fields to be converted to atomic64_t values, without
having their types directly influencing the ethtool stats
export code (gfar_fill_stats) that expects to deal with u64.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2013-02-12 19:07:42 -05:00
..
fs_enet ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
fec_mpc52xx_phy.c
fec_mpc52xx.c net/freescale: remove __dev* attributes 2012-12-03 11:16:54 -08:00
fec_mpc52xx.h drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
fec_ptp.c net: fec: fix spin_lock dead lock 2013-02-07 23:36:41 -05:00
fec.c net: fec: correct fix method about miss init spinlock 2013-02-07 23:36:41 -05:00
fec.h net: fec: add napi support to improve proformance 2013-01-29 14:16:17 -05:00
fsl_pq_mdio.c net/fsl_pq_mdio: add support for the Fman 1G MDIO controller 2012-08-30 13:29:32 -04:00
gianfar_ethtool.c gianfar: remove largely unused gfar_stats struct 2013-02-12 19:07:42 -05:00
gianfar_ptp.c gianfar_ptp: use iomem, not ioports resource tree in probe 2012-10-24 23:18:59 -04:00
gianfar_sysfs.c drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
gianfar.c drivers: net: Remove remaining alloc/OOM messages 2013-02-08 17:44:39 -05:00
gianfar.h gianfar: remove largely unused gfar_stats struct 2013-02-12 19:07:42 -05:00
Kconfig NET: FEC: dynamtic check DMA desc buff type 2013-01-04 15:15:39 -08:00
Makefile NET: FEC: dynamtic check DMA desc buff type 2013-01-04 15:15:39 -08:00
ucc_geth_ethtool.c ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
ucc_geth.c net: fix typo in freescale/ucc_geth.c 2012-10-09 00:21:38 -04:00
ucc_geth.h net: remove skb recycling 2012-10-07 00:40:54 -04:00
xgmac_mdio.c net/freescale: remove __dev* attributes 2012-12-03 11:16:54 -08:00