net: Teach vlans to cleanup as a pernet subsystem
[safe/jmp/linux-2.6] / drivers / net / bmac.c
index b141d02..406f064 100644 (file)
@@ -428,10 +428,11 @@ bmac_init_phy(struct net_device *dev)
        printk(KERN_DEBUG "phy registers:");
        for (addr = 0; addr < 32; ++addr) {
                if ((addr & 7) == 0)
-                       printk("\n" KERN_DEBUG);
-               printk(" %.4x", bmac_mif_read(dev, addr));
+                       printk(KERN_DEBUG);
+               printk(KERN_CONT " %.4x", bmac_mif_read(dev, addr));
        }
-       printk("\n");
+       printk(KERN_CONT "\n");
+
        if (bp->is_bmac_plus) {
                unsigned int capable, ctrl;
 
@@ -716,13 +717,11 @@ static irqreturn_t bmac_rxdma_intr(int irq, void *dev_id)
                        skb_put(skb, nb);
                        skb->protocol = eth_type_trans(skb, dev);
                        netif_rx(skb);
-                       dev->last_rx = jiffies;
                        ++dev->stats.rx_packets;
                        dev->stats.rx_bytes += nb;
                } else {
                        ++dev->stats.rx_dropped;
                }
-               dev->last_rx = jiffies;
                if ((skb = bp->rx_bufs[i]) == NULL) {
                        bp->rx_bufs[i] = skb = dev_alloc_skb(RX_BUFLEN+2);
                        if (skb != NULL)
@@ -1064,7 +1063,6 @@ static int miscintcount;
 static irqreturn_t bmac_misc_intr(int irq, void *dev_id)
 {
        struct net_device *dev = (struct net_device *) dev_id;
-       struct bmac_data *bp = netdev_priv(dev);
        unsigned int status = bmread(dev, STATUS);
        if (miscintcount++ < 10) {
                XXDEBUG(("bmac_misc_intr\n"));
@@ -1242,7 +1240,7 @@ static void bmac_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *inf
 {
        struct bmac_data *bp = netdev_priv(dev);
        strcpy(info->driver, "bmac");
-       strcpy(info->bus_info, bp->mdev->ofdev.dev.bus_id);
+       strcpy(info->bus_info, dev_name(&bp->mdev->ofdev.dev));
 }
 
 static const struct ethtool_ops bmac_ethtool_ops = {
@@ -1250,6 +1248,16 @@ static const struct ethtool_ops bmac_ethtool_ops = {
        .get_link               = ethtool_op_get_link,
 };
 
+static const struct net_device_ops bmac_netdev_ops = {
+       .ndo_open               = bmac_open,
+       .ndo_stop               = bmac_close,
+       .ndo_start_xmit         = bmac_output,
+       .ndo_set_multicast_list = bmac_set_multicast,
+       .ndo_set_mac_address    = bmac_set_address,
+       .ndo_change_mtu         = eth_change_mtu,
+       .ndo_validate_addr      = eth_validate_addr,
+};
+
 static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_id *match)
 {
        int j, rev, ret;
@@ -1311,12 +1319,8 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i
        bmac_enable_and_reset_chip(dev);
        bmwrite(dev, INTDISABLE, DisableAll);
 
-       dev->open = bmac_open;
-       dev->stop = bmac_close;
+       dev->netdev_ops = &bmac_netdev_ops;
        dev->ethtool_ops = &bmac_ethtool_ops;
-       dev->hard_start_xmit = bmac_output;
-       dev->set_multicast_list = bmac_set_multicast;
-       dev->set_mac_address = bmac_set_address;
 
        bmac_get_station_address(dev, addr);
        if (bmac_verify_checksum(dev) != 0)
@@ -1485,7 +1489,7 @@ bmac_output(struct sk_buff *skb, struct net_device *dev)
        struct bmac_data *bp = netdev_priv(dev);
        skb_queue_tail(bp->queue, skb);
        bmac_start(dev);
-       return 0;
+       return NETDEV_TX_OK;
 }
 
 static void bmac_tx_timeout(unsigned long data)