smc: convert to net_device_ops
authorStephen Hemminger <shemminger@vyatta.com>
Wed, 26 Nov 2008 02:23:06 +0000 (18:23 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Nov 2008 02:23:06 +0000 (18:23 -0800)
Convert both eisa and mca versions of this driver, though I doubt
anyone still has the hardware.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/smc-mca.c
drivers/net/smc-ultra.c

index 58a0e0a4a325b2ef33fee3425cb6d373254cb180..ae5f38d9941ca2e61d3b23be28b9ff3ab889269d 100644 (file)
@@ -182,6 +182,22 @@ static char *smc_mca_adapter_names[] __initdata = {
 
 static int ultra_found = 0;
 
+
+static const struct net_device_ops ultra_netdev_ops = {
+       .ndo_open               = ultramca_open,
+       .ndo_stop               = ultramca_close_card,
+
+       .ndo_start_xmit         = ei_start_xmit,
+       .ndo_tx_timeout         = ei_tx_timeout,
+       .ndo_get_stats          = ei_get_stats,
+       .ndo_set_multicast_list = ei_set_multicast_list,
+       .ndo_validate_addr      = eth_validate_addr,
+       .ndo_change_mtu         = eth_change_mtu,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       .ndo_poll_controller    = ei_poll,
+#endif
+};
+
 static int __init ultramca_probe(struct device *gen_dev)
 {
        unsigned short ioaddr;
@@ -384,11 +400,7 @@ static int __init ultramca_probe(struct device *gen_dev)
 
        ei_status.priv = slot;
 
-       dev->open = &ultramca_open;
-       dev->stop = &ultramca_close_card;
-#ifdef CONFIG_NET_POLL_CONTROLLER
-       dev->poll_controller = ei_poll;
-#endif
+       dev->netdev_ops = &ultramca_netdev_ops;
 
        NS8390_init(dev, 0);
 
index 0fe0251767bb52c8e7920e219261839bbacd7769..b3866089a206a48d4ad2900de16f80b754e07be0 100644 (file)
@@ -187,6 +187,21 @@ out:
 }
 #endif
 
+static const struct net_device_ops ultra_netdev_ops = {
+       .ndo_open               = ultra_open,
+       .ndo_stop               = ultra_close_card,
+
+       .ndo_start_xmit         = ei_start_xmit,
+       .ndo_tx_timeout         = ei_tx_timeout,
+       .ndo_get_stats          = ei_get_stats,
+       .ndo_set_multicast_list = ei_set_multicast_list,
+       .ndo_validate_addr      = eth_validate_addr,
+       .ndo_change_mtu         = eth_change_mtu,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       .ndo_poll_controller    = ei_poll,
+#endif
+};
+
 static int __init ultra_probe1(struct net_device *dev, int ioaddr)
 {
        int i, retval;
@@ -300,11 +315,8 @@ static int __init ultra_probe1(struct net_device *dev, int ioaddr)
                ei_status.get_8390_hdr = &ultra_get_8390_hdr;
        }
        ei_status.reset_8390 = &ultra_reset_8390;
-       dev->open = &ultra_open;
-       dev->stop = &ultra_close_card;
-#ifdef CONFIG_NET_POLL_CONTROLLER
-       dev->poll_controller = ei_poll;
-#endif
+
+       dev->netdev_ops = &ultra_netdev_ops;
        NS8390_init(dev, 0);
 
        retval = register_netdev(dev);