]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/tulip/de2104x.c
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
[linux-2.6-omap-h63xx.git] / drivers / net / tulip / de2104x.c
index 3aa60fad68c7aa1b20b11a6616f650d21834eba2..d5d53b633cf81885c2fb30842ae2eb222baf1c57 100644 (file)
@@ -1691,9 +1691,9 @@ static void __devinit de21040_get_mac_address (struct de_private *de)
 
        for (i = 0; i < 6; i++) {
                int value, boguscnt = 100000;
-               do
+               do {
                        value = dr32(ROMCmd);
-               while (value < 0 && --boguscnt > 0);
+               while (value < 0 && --boguscnt > 0);
                de->dev->dev_addr[i] = value;
                udelay(1);
                if (boguscnt <= 0)
@@ -1922,6 +1922,18 @@ bad_srom:
        goto fill_defaults;
 }
 
+static const struct net_device_ops de_netdev_ops = {
+       .ndo_open               = de_open,
+       .ndo_stop               = de_close,
+       .ndo_set_multicast_list = de_set_rx_mode,
+       .ndo_start_xmit         = de_start_xmit,
+       .ndo_get_stats          = de_get_stats,
+       .ndo_tx_timeout         = de_tx_timeout,
+       .ndo_change_mtu         = eth_change_mtu,
+       .ndo_set_mac_address    = eth_mac_addr,
+       .ndo_validate_addr      = eth_validate_addr,
+};
+
 static int __devinit de_init_one (struct pci_dev *pdev,
                                  const struct pci_device_id *ent)
 {
@@ -1944,14 +1956,9 @@ static int __devinit de_init_one (struct pci_dev *pdev,
        if (!dev)
                return -ENOMEM;
 
+       dev->netdev_ops = &de_netdev_ops;
        SET_NETDEV_DEV(dev, &pdev->dev);
-       dev->open = de_open;
-       dev->stop = de_close;
-       dev->set_multicast_list = de_set_rx_mode;
-       dev->hard_start_xmit = de_start_xmit;
-       dev->get_stats = de_get_stats;
        dev->ethtool_ops = &de_ethtool_ops;
-       dev->tx_timeout = de_tx_timeout;
        dev->watchdog_timeo = TX_TIMEOUT;
 
        de = netdev_priv(dev);