Commit e3804cbebb67887879102925961d41b503f7fbe3
Committed by
David S. Miller
1 parent
c649c0e31d
Exists in
master
and in
7 other branches
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>
Showing 8 changed files with 0 additions and 123 deletions Side-by-side Diff
drivers/net/Kconfig
... | ... | @@ -25,15 +25,6 @@ |
25 | 25 | # that for each of the symbols. |
26 | 26 | if NETDEVICES |
27 | 27 | |
28 | -config COMPAT_NET_DEV_OPS | |
29 | - default y | |
30 | - bool "Enable older network device API compatibility" | |
31 | - ---help--- | |
32 | - This option enables kernel compatibility with older network devices | |
33 | - that do not use net_device_ops interface. | |
34 | - | |
35 | - If unsure, say Y. | |
36 | - | |
37 | 28 | config IFB |
38 | 29 | tristate "Intermediate Functional Block support" |
39 | 30 | depends on NET_CLS_ACT |
include/linux/netdevice.h
... | ... | @@ -901,44 +901,6 @@ |
901 | 901 | /* max exchange id for FCoE LRO by ddp */ |
902 | 902 | unsigned int fcoe_ddp_xid; |
903 | 903 | #endif |
904 | - | |
905 | -#ifdef CONFIG_COMPAT_NET_DEV_OPS | |
906 | - struct { | |
907 | - int (*init)(struct net_device *dev); | |
908 | - void (*uninit)(struct net_device *dev); | |
909 | - int (*open)(struct net_device *dev); | |
910 | - int (*stop)(struct net_device *dev); | |
911 | - int (*hard_start_xmit) (struct sk_buff *skb, | |
912 | - struct net_device *dev); | |
913 | - u16 (*select_queue)(struct net_device *dev, | |
914 | - struct sk_buff *skb); | |
915 | - void (*change_rx_flags)(struct net_device *dev, | |
916 | - int flags); | |
917 | - void (*set_rx_mode)(struct net_device *dev); | |
918 | - void (*set_multicast_list)(struct net_device *dev); | |
919 | - int (*set_mac_address)(struct net_device *dev, | |
920 | - void *addr); | |
921 | - int (*validate_addr)(struct net_device *dev); | |
922 | - int (*do_ioctl)(struct net_device *dev, | |
923 | - struct ifreq *ifr, int cmd); | |
924 | - int (*set_config)(struct net_device *dev, | |
925 | - struct ifmap *map); | |
926 | - int (*change_mtu)(struct net_device *dev, int new_mtu); | |
927 | - int (*neigh_setup)(struct net_device *dev, | |
928 | - struct neigh_parms *); | |
929 | - void (*tx_timeout) (struct net_device *dev); | |
930 | - struct net_device_stats* (*get_stats)(struct net_device *dev); | |
931 | - void (*vlan_rx_register)(struct net_device *dev, | |
932 | - struct vlan_group *grp); | |
933 | - void (*vlan_rx_add_vid)(struct net_device *dev, | |
934 | - unsigned short vid); | |
935 | - void (*vlan_rx_kill_vid)(struct net_device *dev, | |
936 | - unsigned short vid); | |
937 | -#ifdef CONFIG_NET_POLL_CONTROLLER | |
938 | - void (*poll_controller)(struct net_device *dev); | |
939 | -#endif | |
940 | - }; | |
941 | -#endif | |
942 | 904 | }; |
943 | 905 | #define to_net_dev(d) container_of(d, struct net_device, dev) |
944 | 906 |
net/802/fddi.c
... | ... | @@ -185,10 +185,6 @@ |
185 | 185 | static void fddi_setup(struct net_device *dev) |
186 | 186 | { |
187 | 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 | 188 | dev->type = ARPHRD_FDDI; |
193 | 189 | dev->hard_header_len = FDDI_K_SNAP_HLEN+3; /* Assume 802.2 SNAP hdr len + 3 pad bytes */ |
194 | 190 | dev->mtu = FDDI_K_SNAP_DLEN; /* Assume max payload of 802.2 SNAP frame */ |
net/802/hippi.c
... | ... | @@ -193,11 +193,6 @@ |
193 | 193 | |
194 | 194 | static 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 | 196 | dev->header_ops = &hippi_header_ops; |
202 | 197 | |
203 | 198 | /* |
net/8021q/vlan_dev.c
net/appletalk/dev.c
... | ... | @@ -9,20 +9,9 @@ |
9 | 9 | #include <linux/if_arp.h> |
10 | 10 | #include <linux/if_ltalk.h> |
11 | 11 | |
12 | -#ifdef CONFIG_COMPAT_NET_DEV_OPS | |
13 | -static int ltalk_change_mtu(struct net_device *dev, int mtu) | |
14 | -{ | |
15 | - return -EINVAL; | |
16 | -} | |
17 | -#endif | |
18 | - | |
19 | 12 | static void ltalk_setup(struct net_device *dev) |
20 | 13 | { |
21 | 14 | /* Fill in the fields of the device structure with localtalk-generic values. */ |
22 | - | |
23 | -#ifdef CONFIG_COMPAT_NET_DEV_OPS | |
24 | - dev->change_mtu = ltalk_change_mtu; | |
25 | -#endif | |
26 | 15 | |
27 | 16 | dev->type = ARPHRD_LOCALTLK; |
28 | 17 | dev->hard_header_len = LTALK_HLEN; |
net/core/dev.c
... | ... | @@ -4580,39 +4580,6 @@ |
4580 | 4580 | } |
4581 | 4581 | EXPORT_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 | - */ | |
4587 | -void 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 | -} | |
4614 | -EXPORT_SYMBOL(netdev_resync_ops); | |
4615 | - | |
4616 | 4583 | /** |
4617 | 4584 | * register_netdevice - register a network device |
4618 | 4585 | * @dev: device to register |
... | ... | @@ -4651,23 +4618,6 @@ |
4651 | 4618 | netdev_init_queue_locks(dev); |
4652 | 4619 | |
4653 | 4620 | dev->iflink = -1; |
4654 | - | |
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 | 4621 | |
4672 | 4622 | /* Init, if this function is available */ |
4673 | 4623 | if (dev->netdev_ops->ndo_init) { |
net/ethernet/eth.c
... | ... | @@ -337,11 +337,6 @@ |
337 | 337 | void ether_setup(struct net_device *dev) |
338 | 338 | { |
339 | 339 | dev->header_ops = ð_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 | 340 | dev->type = ARPHRD_ETHER; |
346 | 341 | dev->hard_header_len = ETH_HLEN; |
347 | 342 | dev->mtu = ETH_DATA_LEN; |