]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ehea: Use net_device_ops structure
authorThomas Klein <tklein@de.ibm.com>
Wed, 21 Jan 2009 22:43:59 +0000 (14:43 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Jan 2009 22:43:59 +0000 (14:43 -0800)
Adapt to lately introduced net_device_ops structure.

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ehea/ehea.h
drivers/net/ehea/ehea_main.c

index 6271b9411ccf08c079046059a00d4584746a9d83..f7e2ccfd3e8cfe73c2f23467ca905f29d5445bc0 100644 (file)
@@ -40,7 +40,7 @@
 #include <asm/io.h>
 
 #define DRV_NAME       "ehea"
-#define DRV_VERSION    "EHEA_0096"
+#define DRV_VERSION    "EHEA_0097"
 
 /* eHEA capability flags */
 #define DLPAR_PORT_ADD_REM 1
index 8dc2047da5c0639ca36a0a8015d0d88cb611078b..d0c2c4569f25f79c14b935a9e85bad0d07d7dd86 100644 (file)
@@ -3069,6 +3069,22 @@ static void ehea_unregister_port(struct ehea_port *port)
        of_device_unregister(&port->ofdev);
 }
 
+static const struct net_device_ops ehea_netdev_ops = {
+       .ndo_open               = ehea_open,
+       .ndo_stop               = ehea_stop,
+       .ndo_start_xmit         = ehea_start_xmit,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       .ndo_poll_controller    = ehea_netpoll,
+#endif
+       .ndo_get_stats          = ehea_get_stats,
+       .ndo_set_mac_address    = ehea_set_mac_addr,
+       .ndo_set_multicast_list = ehea_set_multicast_list,
+       .ndo_change_mtu         = ehea_change_mtu,
+       .ndo_vlan_rx_register   = ehea_vlan_rx_register,
+       .ndo_vlan_rx_add_vid    = ehea_vlan_rx_add_vid,
+       .ndo_vlan_rx_kill_vid   = ehea_vlan_rx_kill_vid
+};
+
 struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter,
                                         u32 logical_port_id,
                                         struct device_node *dn)
@@ -3121,19 +3137,9 @@ struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter,
        /* initialize net_device structure */
        memcpy(dev->dev_addr, &port->mac_addr, ETH_ALEN);
 
-       dev->open = ehea_open;
-#ifdef CONFIG_NET_POLL_CONTROLLER
-       dev->poll_controller = ehea_netpoll;
-#endif
-       dev->stop = ehea_stop;
-       dev->hard_start_xmit = ehea_start_xmit;
-       dev->get_stats = ehea_get_stats;
-       dev->set_multicast_list = ehea_set_multicast_list;
-       dev->set_mac_address = ehea_set_mac_addr;
-       dev->change_mtu = ehea_change_mtu;
-       dev->vlan_rx_register = ehea_vlan_rx_register;
-       dev->vlan_rx_add_vid = ehea_vlan_rx_add_vid;
-       dev->vlan_rx_kill_vid = ehea_vlan_rx_kill_vid;
+       dev->netdev_ops = &ehea_netdev_ops;
+       ehea_set_ethtool_ops(dev);
+
        dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_TSO
                      | NETIF_F_HIGHDMA | NETIF_F_IP_CSUM | NETIF_F_HW_VLAN_TX
                      | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER
@@ -3142,7 +3148,6 @@ struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter,
        dev->watchdog_timeo = EHEA_WATCH_DOG_TIMEOUT;
 
        INIT_WORK(&port->reset_task, ehea_reset_port);
-       ehea_set_ethtool_ops(dev);
 
        ret = register_netdev(dev);
        if (ret) {