netdev: introduce dev_get_stats()
In order for the network device ops get_stats call to be immutable, the handling of the default internal network device stats block has to be changed. Add a new helper function which replaces the old use of internal_get_stats. Note: change return code to make it clear that the caller should not go changing the returned statistics. Signed-off-by:Stephen Hemminger <shemminger@vyatta.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- arch/s390/appldata/appldata_net_sum.c 2 additions, 2 deletionsarch/s390/appldata/appldata_net_sum.c
- drivers/net/bonding/bond_main.c 3 additions, 2 deletionsdrivers/net/bonding/bond_main.c
- drivers/net/sfc/ethtool.c 1 addition, 1 deletiondrivers/net/sfc/ethtool.c
- drivers/parisc/led.c 2 additions, 2 deletionsdrivers/parisc/led.c
- include/linux/netdevice.h 3 additions, 1 deletioninclude/linux/netdevice.h
- net/core/dev.c 18 additions, 5 deletionsnet/core/dev.c
- net/core/net-sysfs.c 1 addition, 2 deletionsnet/core/net-sysfs.c
- net/core/rtnetlink.c 3 additions, 3 deletionsnet/core/rtnetlink.c
Loading
Please register or sign in to comment