aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-05-25 04:53:53 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-25 04:53:53 -0400
commite3804cbebb67887879102925961d41b503f7fbe3 (patch)
tree0c2290608f511bf97978767e159121e3009c56e3 /net/core/dev.c
parentc649c0e31d5736a4b7c5c3454182091dda4bbe62 (diff)
net: remove COMPAT_NET_DEV_OPS
All drivers are already converted to new net_device_ops API and nobody uses old API anymore. Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 3942266d1f6c..241613f6dd2f 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4580,39 +4580,6 @@ unsigned long netdev_fix_features(unsigned long features, const char *name)
4580} 4580}
4581EXPORT_SYMBOL(netdev_fix_features); 4581EXPORT_SYMBOL(netdev_fix_features);
4582 4582
4583/* Some devices need to (re-)set their netdev_ops inside
4584 * ->init() or similar. If that happens, we have to setup
4585 * the compat pointers again.
4586 */
4587void netdev_resync_ops(struct net_device *dev)
4588{
4589#ifdef CONFIG_COMPAT_NET_DEV_OPS
4590 const struct net_device_ops *ops = dev->netdev_ops;
4591
4592 dev->init = ops->ndo_init;
4593 dev->uninit = ops->ndo_uninit;
4594 dev->open = ops->ndo_open;
4595 dev->change_rx_flags = ops->ndo_change_rx_flags;
4596 dev->set_rx_mode = ops->ndo_set_rx_mode;
4597 dev->set_multicast_list = ops->ndo_set_multicast_list;
4598 dev->set_mac_address = ops->ndo_set_mac_address;
4599 dev->validate_addr = ops->ndo_validate_addr;
4600 dev->do_ioctl = ops->ndo_do_ioctl;
4601 dev->set_config = ops->ndo_set_config;
4602 dev->change_mtu = ops->ndo_change_mtu;
4603 dev->neigh_setup = ops->ndo_neigh_setup;
4604 dev->tx_timeout = ops->ndo_tx_timeout;
4605 dev->get_stats = ops->ndo_get_stats;
4606 dev->vlan_rx_register = ops->ndo_vlan_rx_register;
4607 dev->vlan_rx_add_vid = ops->ndo_vlan_rx_add_vid;
4608 dev->vlan_rx_kill_vid = ops->ndo_vlan_rx_kill_vid;
4609#ifdef CONFIG_NET_POLL_CONTROLLER
4610 dev->poll_controller = ops->ndo_poll_controller;
4611#endif
4612#endif
4613}
4614EXPORT_SYMBOL(netdev_resync_ops);
4615
4616/** 4583/**
4617 * register_netdevice - register a network device 4584 * register_netdevice - register a network device
4618 * @dev: device to register 4585 * @dev: device to register
@@ -4652,23 +4619,6 @@ int register_netdevice(struct net_device *dev)
4652 4619
4653 dev->iflink = -1; 4620 dev->iflink = -1;
4654 4621
4655#ifdef CONFIG_COMPAT_NET_DEV_OPS
4656 /* Netdevice_ops API compatibility support.
4657 * This is temporary until all network devices are converted.
4658 */
4659 if (dev->netdev_ops) {
4660 netdev_resync_ops(dev);
4661 } else {
4662 char drivername[64];
4663 pr_info("%s (%s): not using net_device_ops yet\n",
4664 dev->name, netdev_drivername(dev, drivername, 64));
4665
4666 /* This works only because net_device_ops and the
4667 compatibility structure are the same. */
4668 dev->netdev_ops = (void *) &(dev->init);
4669 }
4670#endif
4671
4672 /* Init, if this function is available */ 4622 /* Init, if this function is available */
4673 if (dev->netdev_ops->ndo_init) { 4623 if (dev->netdev_ops->ndo_init) {
4674 ret = dev->netdev_ops->ndo_init(dev); 4624 ret = dev->netdev_ops->ndo_init(dev);