loopback.c (3eb66e91a25497065c5322b1268cbc3953642227) | loopback.c (af730342ec3b0096bca913a963b34884b28a810d) |
---|---|
1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * Pseudo-driver for the loopback interface. 7 * 8 * Version: @(#)loopback.c 1.0.4b 08/16/93 --- 114 unchanged lines hidden (view full) --- 123 stats->tx_bytes = bytes; 124} 125 126static u32 always_on(struct net_device *dev) 127{ 128 return 1; 129} 130 | 1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * Pseudo-driver for the loopback interface. 7 * 8 * Version: @(#)loopback.c 1.0.4b 08/16/93 --- 114 unchanged lines hidden (view full) --- 123 stats->tx_bytes = bytes; 124} 125 126static u32 always_on(struct net_device *dev) 127{ 128 return 1; 129} 130 |
131static int loopback_get_ts_info(struct net_device *netdev, 132 struct ethtool_ts_info *ts_info) 133{ 134 ts_info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE | 135 SOF_TIMESTAMPING_RX_SOFTWARE | 136 SOF_TIMESTAMPING_SOFTWARE; 137 138 ts_info->phc_index = -1; 139 140 return 0; 141}; 142 | |
143static const struct ethtool_ops loopback_ethtool_ops = { 144 .get_link = always_on, | 131static const struct ethtool_ops loopback_ethtool_ops = { 132 .get_link = always_on, |
145 .get_ts_info = loopback_get_ts_info, | 133 .get_ts_info = ethtool_op_get_ts_info, |
146}; 147 148static int loopback_dev_init(struct net_device *dev) 149{ 150 dev->lstats = netdev_alloc_pcpu_stats(struct pcpu_lstats); 151 if (!dev->lstats) 152 return -ENOMEM; 153 return 0; --- 78 unchanged lines hidden --- | 134}; 135 136static int loopback_dev_init(struct net_device *dev) 137{ 138 dev->lstats = netdev_alloc_pcpu_stats(struct pcpu_lstats); 139 if (!dev->lstats) 140 return -ENOMEM; 141 return 0; --- 78 unchanged lines hidden --- |