diff options
author | Thomas Klein <tklein@de.ibm.com> | 2009-01-21 17:43:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 17:43:59 -0500 |
commit | 086c1b2c52f03d128d1a6db47f8736c56e915043 (patch) | |
tree | 9274047f759166299d08a274375c8aceefb87c2a /drivers | |
parent | 8017943e6b177f117e4be71f09a38e2c9fd56193 (diff) |
ehea: Use net_device_ops structure
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ehea/ehea.h | 2 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 33 |
2 files changed, 20 insertions, 15 deletions
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 6271b9411ccf..f7e2ccfd3e8c 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/io.h> | 40 | #include <asm/io.h> |
41 | 41 | ||
42 | #define DRV_NAME "ehea" | 42 | #define DRV_NAME "ehea" |
43 | #define DRV_VERSION "EHEA_0096" | 43 | #define DRV_VERSION "EHEA_0097" |
44 | 44 | ||
45 | /* eHEA capability flags */ | 45 | /* eHEA capability flags */ |
46 | #define DLPAR_PORT_ADD_REM 1 | 46 | #define DLPAR_PORT_ADD_REM 1 |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 8dc2047da5c0..d0c2c4569f25 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -3069,6 +3069,22 @@ static void ehea_unregister_port(struct ehea_port *port) | |||
3069 | of_device_unregister(&port->ofdev); | 3069 | of_device_unregister(&port->ofdev); |
3070 | } | 3070 | } |
3071 | 3071 | ||
3072 | static const struct net_device_ops ehea_netdev_ops = { | ||
3073 | .ndo_open = ehea_open, | ||
3074 | .ndo_stop = ehea_stop, | ||
3075 | .ndo_start_xmit = ehea_start_xmit, | ||
3076 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
3077 | .ndo_poll_controller = ehea_netpoll, | ||
3078 | #endif | ||
3079 | .ndo_get_stats = ehea_get_stats, | ||
3080 | .ndo_set_mac_address = ehea_set_mac_addr, | ||
3081 | .ndo_set_multicast_list = ehea_set_multicast_list, | ||
3082 | .ndo_change_mtu = ehea_change_mtu, | ||
3083 | .ndo_vlan_rx_register = ehea_vlan_rx_register, | ||
3084 | .ndo_vlan_rx_add_vid = ehea_vlan_rx_add_vid, | ||
3085 | .ndo_vlan_rx_kill_vid = ehea_vlan_rx_kill_vid | ||
3086 | }; | ||
3087 | |||
3072 | struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, | 3088 | struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, |
3073 | u32 logical_port_id, | 3089 | u32 logical_port_id, |
3074 | struct device_node *dn) | 3090 | struct device_node *dn) |
@@ -3121,19 +3137,9 @@ struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, | |||
3121 | /* initialize net_device structure */ | 3137 | /* initialize net_device structure */ |
3122 | memcpy(dev->dev_addr, &port->mac_addr, ETH_ALEN); | 3138 | memcpy(dev->dev_addr, &port->mac_addr, ETH_ALEN); |
3123 | 3139 | ||
3124 | dev->open = ehea_open; | 3140 | dev->netdev_ops = &ehea_netdev_ops; |
3125 | #ifdef CONFIG_NET_POLL_CONTROLLER | 3141 | ehea_set_ethtool_ops(dev); |
3126 | dev->poll_controller = ehea_netpoll; | 3142 | |
3127 | #endif | ||
3128 | dev->stop = ehea_stop; | ||
3129 | dev->hard_start_xmit = ehea_start_xmit; | ||
3130 | dev->get_stats = ehea_get_stats; | ||
3131 | dev->set_multicast_list = ehea_set_multicast_list; | ||
3132 | dev->set_mac_address = ehea_set_mac_addr; | ||
3133 | dev->change_mtu = ehea_change_mtu; | ||
3134 | dev->vlan_rx_register = ehea_vlan_rx_register; | ||
3135 | dev->vlan_rx_add_vid = ehea_vlan_rx_add_vid; | ||
3136 | dev->vlan_rx_kill_vid = ehea_vlan_rx_kill_vid; | ||
3137 | dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_TSO | 3143 | dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_TSO |
3138 | | NETIF_F_HIGHDMA | NETIF_F_IP_CSUM | NETIF_F_HW_VLAN_TX | 3144 | | NETIF_F_HIGHDMA | NETIF_F_IP_CSUM | NETIF_F_HW_VLAN_TX |
3139 | | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER | 3145 | | 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, | |||
3142 | dev->watchdog_timeo = EHEA_WATCH_DOG_TIMEOUT; | 3148 | dev->watchdog_timeo = EHEA_WATCH_DOG_TIMEOUT; |
3143 | 3149 | ||
3144 | INIT_WORK(&port->reset_task, ehea_reset_port); | 3150 | INIT_WORK(&port->reset_task, ehea_reset_port); |
3145 | ehea_set_ethtool_ops(dev); | ||
3146 | 3151 | ||
3147 | ret = register_netdev(dev); | 3152 | ret = register_netdev(dev); |
3148 | if (ret) { | 3153 | if (ret) { |