diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/batman-adv/soft-interface.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 3f20332e1d38..3e2f91ffa4e2 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -750,7 +750,6 @@ out: | |||
750 | return; | 750 | return; |
751 | } | 751 | } |
752 | 752 | ||
753 | #ifdef HAVE_NET_DEVICE_OPS | ||
754 | static const struct net_device_ops bat_netdev_ops = { | 753 | static const struct net_device_ops bat_netdev_ops = { |
755 | .ndo_open = interface_open, | 754 | .ndo_open = interface_open, |
756 | .ndo_stop = interface_release, | 755 | .ndo_stop = interface_release, |
@@ -760,7 +759,6 @@ static const struct net_device_ops bat_netdev_ops = { | |||
760 | .ndo_start_xmit = interface_tx, | 759 | .ndo_start_xmit = interface_tx, |
761 | .ndo_validate_addr = eth_validate_addr | 760 | .ndo_validate_addr = eth_validate_addr |
762 | }; | 761 | }; |
763 | #endif | ||
764 | 762 | ||
765 | static void interface_setup(struct net_device *dev) | 763 | static void interface_setup(struct net_device *dev) |
766 | { | 764 | { |
@@ -769,16 +767,7 @@ static void interface_setup(struct net_device *dev) | |||
769 | 767 | ||
770 | ether_setup(dev); | 768 | ether_setup(dev); |
771 | 769 | ||
772 | #ifdef HAVE_NET_DEVICE_OPS | ||
773 | dev->netdev_ops = &bat_netdev_ops; | 770 | dev->netdev_ops = &bat_netdev_ops; |
774 | #else | ||
775 | dev->open = interface_open; | ||
776 | dev->stop = interface_release; | ||
777 | dev->get_stats = interface_stats; | ||
778 | dev->set_mac_address = interface_set_mac_addr; | ||
779 | dev->change_mtu = interface_change_mtu; | ||
780 | dev->hard_start_xmit = interface_tx; | ||
781 | #endif | ||
782 | dev->destructor = free_netdev; | 771 | dev->destructor = free_netdev; |
783 | dev->tx_queue_len = 0; | 772 | dev->tx_queue_len = 0; |
784 | 773 | ||
@@ -885,13 +874,8 @@ void softif_destroy(struct net_device *soft_iface) | |||
885 | 874 | ||
886 | int softif_is_valid(const struct net_device *net_dev) | 875 | int softif_is_valid(const struct net_device *net_dev) |
887 | { | 876 | { |
888 | #ifdef HAVE_NET_DEVICE_OPS | ||
889 | if (net_dev->netdev_ops->ndo_start_xmit == interface_tx) | 877 | if (net_dev->netdev_ops->ndo_start_xmit == interface_tx) |
890 | return 1; | 878 | return 1; |
891 | #else | ||
892 | if (net_dev->hard_start_xmit == interface_tx) | ||
893 | return 1; | ||
894 | #endif | ||
895 | 879 | ||
896 | return 0; | 880 | return 0; |
897 | } | 881 | } |