31 #include <linux/module.h>
32 #include <linux/kernel.h>
33 #include <linux/netdevice.h>
37 #include <linux/rtnetlink.h>
41 static int numdummies = 1;
66 start = u64_stats_fetch_begin_bh(&dstats->
syncp);
69 }
while (u64_stats_fetch_retry_bh(&dstats->
syncp, start));
80 u64_stats_update_begin(&dstats->
syncp);
83 u64_stats_update_end(&dstats->
syncp);
89 static int dummy_dev_init(
struct net_device *dev)
98 static void dummy_dev_uninit(
struct net_device *dev)
104 .ndo_init = dummy_dev_init,
105 .ndo_uninit = dummy_dev_uninit,
106 .ndo_start_xmit = dummy_xmit,
108 .ndo_set_rx_mode = set_multicast_list,
110 .ndo_get_stats64 = dummy_get_stats64,
113 static void dummy_setup(
struct net_device *dev)
128 eth_hw_addr_random(dev);
134 if (nla_len(tb[IFLA_ADDRESS]) !=
ETH_ALEN)
136 if (!is_valid_ether_addr(nla_data(tb[IFLA_ADDRESS])))
144 .setup = dummy_setup,
145 .validate = dummy_validate,
152 static int __init dummy_init_one(
void)
172 static int __init dummy_init_module(
void)
179 for (i = 0; i < numdummies && !
err; i++) {
180 err = dummy_init_one();
190 static void __exit dummy_cleanup_module(
void)