aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/802/fddi.c4
-rw-r--r--net/802/hippi.c5
-rw-r--r--net/8021q/vlan_dev.c1
-rw-r--r--net/appletalk/dev.c11
-rw-r--r--net/core/dev.c50
-rw-r--r--net/ethernet/eth.c5
6 files changed, 0 insertions, 76 deletions
diff --git a/net/802/fddi.c b/net/802/fddi.c
index 539e6064e6d4..3ef0ab0a543a 100644
--- a/net/802/fddi.c
+++ b/net/802/fddi.c
@@ -185,10 +185,6 @@ static const struct header_ops fddi_header_ops = {
185static void fddi_setup(struct net_device *dev) 185static void fddi_setup(struct net_device *dev)
186{ 186{
187 dev->header_ops = &fddi_header_ops; 187 dev->header_ops = &fddi_header_ops;
188#ifdef CONFIG_COMPAT_NET_DEV_OPS
189 dev->change_mtu = fddi_change_mtu,
190#endif
191
192 dev->type = ARPHRD_FDDI; 188 dev->type = ARPHRD_FDDI;
193 dev->hard_header_len = FDDI_K_SNAP_HLEN+3; /* Assume 802.2 SNAP hdr len + 3 pad bytes */ 189 dev->hard_header_len = FDDI_K_SNAP_HLEN+3; /* Assume 802.2 SNAP hdr len + 3 pad bytes */
194 dev->mtu = FDDI_K_SNAP_DLEN; /* Assume max payload of 802.2 SNAP frame */ 190 dev->mtu = FDDI_K_SNAP_DLEN; /* Assume max payload of 802.2 SNAP frame */
diff --git a/net/802/hippi.c b/net/802/hippi.c
index 313b9ebf92ee..cd3e8e929529 100644
--- a/net/802/hippi.c
+++ b/net/802/hippi.c
@@ -193,11 +193,6 @@ static const struct header_ops hippi_header_ops = {
193 193
194static void hippi_setup(struct net_device *dev) 194static void hippi_setup(struct net_device *dev)
195{ 195{
196#ifdef CONFIG_COMPAT_NET_DEV_OPS
197 dev->change_mtu = hippi_change_mtu;
198 dev->set_mac_address = hippi_mac_addr;
199 dev->neigh_setup = hippi_neigh_setup_dev;
200#endif
201 dev->header_ops = &hippi_header_ops; 196 dev->header_ops = &hippi_header_ops;
202 197
203 /* 198 /*
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index ff7572ac5481..1e2ad4c7c59b 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -644,7 +644,6 @@ static int vlan_dev_init(struct net_device *dev)
644 dev->hard_header_len = real_dev->hard_header_len + VLAN_HLEN; 644 dev->hard_header_len = real_dev->hard_header_len + VLAN_HLEN;
645 dev->netdev_ops = &vlan_netdev_ops; 645 dev->netdev_ops = &vlan_netdev_ops;
646 } 646 }
647 netdev_resync_ops(dev);
648 647
649 if (is_vlan_dev(real_dev)) 648 if (is_vlan_dev(real_dev))
650 subclass = 1; 649 subclass = 1;
diff --git a/net/appletalk/dev.c b/net/appletalk/dev.c
index 72277d70c980..6c8016f61866 100644
--- a/net/appletalk/dev.c
+++ b/net/appletalk/dev.c
@@ -9,21 +9,10 @@
9#include <linux/if_arp.h> 9#include <linux/if_arp.h>
10#include <linux/if_ltalk.h> 10#include <linux/if_ltalk.h>
11 11
12#ifdef CONFIG_COMPAT_NET_DEV_OPS
13static int ltalk_change_mtu(struct net_device *dev, int mtu)
14{
15 return -EINVAL;
16}
17#endif
18
19static void ltalk_setup(struct net_device *dev) 12static void ltalk_setup(struct net_device *dev)
20{ 13{
21 /* Fill in the fields of the device structure with localtalk-generic values. */ 14 /* Fill in the fields of the device structure with localtalk-generic values. */
22 15
23#ifdef CONFIG_COMPAT_NET_DEV_OPS
24 dev->change_mtu = ltalk_change_mtu;
25#endif
26
27 dev->type = ARPHRD_LOCALTLK; 16 dev->type = ARPHRD_LOCALTLK;
28 dev->hard_header_len = LTALK_HLEN; 17 dev->hard_header_len = LTALK_HLEN;
29 dev->mtu = LTALK_MTU; 18 dev->mtu = LTALK_MTU;
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);
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 280352aba403..5a883affecd3 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -337,11 +337,6 @@ const struct header_ops eth_header_ops ____cacheline_aligned = {
337void ether_setup(struct net_device *dev) 337void ether_setup(struct net_device *dev)
338{ 338{
339 dev->header_ops = &eth_header_ops; 339 dev->header_ops = &eth_header_ops;
340#ifdef CONFIG_COMPAT_NET_DEV_OPS
341 dev->change_mtu = eth_change_mtu;
342 dev->set_mac_address = eth_mac_addr;
343 dev->validate_addr = eth_validate_addr;
344#endif
345 dev->type = ARPHRD_ETHER; 340 dev->type = ARPHRD_ETHER;
346 dev->hard_header_len = ETH_HLEN; 341 dev->hard_header_len = ETH_HLEN;
347 dev->mtu = ETH_DATA_LEN; 342 dev->mtu = ETH_DATA_LEN;