l2tp_eth.c (a402eae64d0ad12b1c4a411f250d6c161e67f623) | l2tp_eth.c (bc1f44709cf27fb2a5766cadafe7e2ad5e9cb221) |
---|---|
1/* 2 * L2TPv3 ethernet pseudowire driver 3 * 4 * Copyright (c) 2008,2009,2010 Katalix Systems Ltd 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 92 unchanged lines hidden (view full) --- 101 atomic_long_add(len, &priv->tx_bytes); 102 atomic_long_inc(&priv->tx_packets); 103 } else { 104 atomic_long_inc(&priv->tx_dropped); 105 } 106 return NETDEV_TX_OK; 107} 108 | 1/* 2 * L2TPv3 ethernet pseudowire driver 3 * 4 * Copyright (c) 2008,2009,2010 Katalix Systems Ltd 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 92 unchanged lines hidden (view full) --- 101 atomic_long_add(len, &priv->tx_bytes); 102 atomic_long_inc(&priv->tx_packets); 103 } else { 104 atomic_long_inc(&priv->tx_dropped); 105 } 106 return NETDEV_TX_OK; 107} 108 |
109static struct rtnl_link_stats64 *l2tp_eth_get_stats64(struct net_device *dev, 110 struct rtnl_link_stats64 *stats) | 109static void l2tp_eth_get_stats64(struct net_device *dev, 110 struct rtnl_link_stats64 *stats) |
111{ 112 struct l2tp_eth *priv = netdev_priv(dev); 113 114 stats->tx_bytes = atomic_long_read(&priv->tx_bytes); 115 stats->tx_packets = atomic_long_read(&priv->tx_packets); 116 stats->tx_dropped = atomic_long_read(&priv->tx_dropped); 117 stats->rx_bytes = atomic_long_read(&priv->rx_bytes); 118 stats->rx_packets = atomic_long_read(&priv->rx_packets); 119 stats->rx_errors = atomic_long_read(&priv->rx_errors); | 111{ 112 struct l2tp_eth *priv = netdev_priv(dev); 113 114 stats->tx_bytes = atomic_long_read(&priv->tx_bytes); 115 stats->tx_packets = atomic_long_read(&priv->tx_packets); 116 stats->tx_dropped = atomic_long_read(&priv->tx_dropped); 117 stats->rx_bytes = atomic_long_read(&priv->rx_bytes); 118 stats->rx_packets = atomic_long_read(&priv->rx_packets); 119 stats->rx_errors = atomic_long_read(&priv->rx_errors); |
120 return stats; | |
121} 122 | 120} 121 |
123 | |
124static const struct net_device_ops l2tp_eth_netdev_ops = { 125 .ndo_init = l2tp_eth_dev_init, 126 .ndo_uninit = l2tp_eth_dev_uninit, 127 .ndo_start_xmit = l2tp_eth_dev_xmit, 128 .ndo_get_stats64 = l2tp_eth_get_stats64, 129 .ndo_set_mac_address = eth_mac_addr, 130}; 131 --- 232 unchanged lines hidden --- | 122static const struct net_device_ops l2tp_eth_netdev_ops = { 123 .ndo_init = l2tp_eth_dev_init, 124 .ndo_uninit = l2tp_eth_dev_uninit, 125 .ndo_start_xmit = l2tp_eth_dev_xmit, 126 .ndo_get_stats64 = l2tp_eth_get_stats64, 127 .ndo_set_mac_address = eth_mac_addr, 128}; 129 --- 232 unchanged lines hidden --- |