]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/pcmcia/nmclan_cs.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
[karo-tx-linux.git] / drivers / net / pcmcia / nmclan_cs.c
index 448cd40aeba5ab37c2c913db34745ac87b2857fd..02ef63ed1f99ba6b6d630822baa6b5ddf897e2d2 100644 (file)
@@ -436,6 +436,19 @@ static const struct ethtool_ops netdev_ethtool_ops;
 
 static void nmclan_detach(struct pcmcia_device *p_dev);
 
+static const struct net_device_ops mace_netdev_ops = {
+       .ndo_open               = mace_open,
+       .ndo_stop               = mace_close,
+       .ndo_start_xmit         = mace_start_xmit,
+       .ndo_tx_timeout         = mace_tx_timeout,
+       .ndo_set_config         = mace_config,
+       .ndo_get_stats          = mace_get_stats,
+       .ndo_set_multicast_list = set_multicast_list,
+       .ndo_change_mtu         = eth_change_mtu,
+       .ndo_set_mac_address    = eth_mac_addr,
+       .ndo_validate_addr      = eth_validate_addr,
+};
+
 /* ----------------------------------------------------------------------------
 nmclan_attach
        Creates an "instance" of the driver, allocating local data
@@ -474,17 +487,9 @@ static int nmclan_probe(struct pcmcia_device *link)
 
     lp->tx_free_frames=AM2150_MAX_TX_FRAMES;
 
-    dev->hard_start_xmit = &mace_start_xmit;
-    dev->set_config = &mace_config;
-    dev->get_stats = &mace_get_stats;
-    dev->set_multicast_list = &set_multicast_list;
+    dev->netdev_ops = &mace_netdev_ops;
     SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
-    dev->open = &mace_open;
-    dev->stop = &mace_close;
-#ifdef HAVE_TX_TIMEOUT
-    dev->tx_timeout = mace_tx_timeout;
     dev->watchdog_timeo = TX_TIMEOUT;
-#endif
 
     return nmclan_config(link);
 } /* nmclan_attach */
@@ -659,7 +664,6 @@ static int nmclan_config(struct pcmcia_device *link)
   u_char buf[64];
   int i, last_ret, last_fn;
   unsigned int ioaddr;
-  DECLARE_MAC_BUF(mac);
 
   DEBUG(0, "nmclan_config(0x%p)\n", link);
 
@@ -719,9 +723,9 @@ static int nmclan_config(struct pcmcia_device *link)
   strcpy(lp->node.dev_name, dev->name);
 
   printk(KERN_INFO "%s: nmclan: port %#3lx, irq %d, %s port,"
-        " hw_addr %s\n",
+        " hw_addr %pM\n",
         dev->name, dev->base_addr, dev->irq, if_names[dev->if_port],
-        print_mac(mac, dev->dev_addr));
+        dev->dev_addr);
   return 0;
 
 cs_failed:
@@ -1193,7 +1197,6 @@ static int mace_rx(struct net_device *dev, unsigned char RxCnt)
        
        netif_rx(skb); /* Send the packet to the upper (protocol) layers. */
 
-       dev->last_rx = jiffies;
        lp->linux_stats.rx_packets++;
        lp->linux_stats.rx_bytes += pkt_len;
        outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */