ath9k: follow beacon hints on reg_notifier when world roaming
[safe/jmp/linux-2.6] / drivers / net / 3c507.c
index 3d06271..fbbaf82 100644 (file)
@@ -352,6 +352,16 @@ out:
        return ERR_PTR(err);
 }
 
+static const struct net_device_ops netdev_ops = {
+       .ndo_open               = el16_open,
+       .ndo_stop               = el16_close,
+       .ndo_start_xmit         = el16_send_packet,
+       .ndo_tx_timeout         = el16_tx_timeout,
+       .ndo_change_mtu         = eth_change_mtu,
+       .ndo_set_mac_address    = eth_mac_addr,
+       .ndo_validate_addr      = eth_validate_addr,
+};
+
 static int __init el16_probe1(struct net_device *dev, int ioaddr)
 {
        static unsigned char init_ID_done, version_printed;
@@ -402,10 +412,9 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr)
        dev->base_addr = ioaddr;
 
        outb(0x01, ioaddr + MISC_CTRL);
-       for (i = 0; i < 6; i++) {
+       for (i = 0; i < 6; i++)
                dev->dev_addr[i] = inb(ioaddr + i);
-               printk(" %02x", dev->dev_addr[i]);
-       }
+       printk(" %pM", dev->dev_addr);
 
        if (mem_start)
                net_debug = mem_start & 7;
@@ -450,10 +459,7 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr)
                goto out1;
        }
 
-       dev->open = el16_open;
-       dev->stop = el16_close;
-       dev->hard_start_xmit = el16_send_packet;
-       dev->tx_timeout = el16_tx_timeout;
+       dev->netdev_ops = &netdev_ops;
        dev->watchdog_timeo = TX_TIMEOUT;
        dev->ethtool_ops = &netdev_ethtool_ops;
        dev->flags &= ~IFF_MULTICAST;   /* Multicast doesn't work */
@@ -747,7 +753,7 @@ static void init_82586_mem(struct net_device *dev)
                int boguscnt = 50;
                while (readw(shmem+iSCB_STATUS) == 0)
                        if (--boguscnt == 0) {
-                               printk("%s: i82586 initialization timed out with status %04x,"
+                               printk("%s: i82586 initialization timed out with status %04x, "
                                           "cmd %04x.\n", dev->name,
                                           readw(shmem+iSCB_STATUS), readw(shmem+iSCB_CMD));
                                break;
@@ -832,10 +838,11 @@ static void el16_rx(struct net_device *dev)
 
                if (rfd_cmd != 0 || data_buffer_addr != rx_head + 22
                        || (pkt_len & 0xC000) != 0xC000) {
-                       printk("%s: Rx frame at %#x corrupted, status %04x cmd %04x"
-                                  "next %04x data-buf @%04x %04x.\n", dev->name, rx_head,
-                                  frame_status, rfd_cmd, next_rx_frame, data_buffer_addr,
-                                  pkt_len);
+                       printk(KERN_ERR "%s: Rx frame at %#x corrupted, "
+                              "status %04x cmd %04x next %04x "
+                              "data-buf @%04x %04x.\n",
+                              dev->name, rx_head, frame_status, rfd_cmd,
+                              next_rx_frame, data_buffer_addr, pkt_len);
                } else if ((frame_status & 0x2000) == 0) {
                        /* Frame Rxed, but with error. */
                        dev->stats.rx_errors++;
@@ -851,7 +858,9 @@ static void el16_rx(struct net_device *dev)
                        pkt_len &= 0x3fff;
                        skb = dev_alloc_skb(pkt_len+2);
                        if (skb == NULL) {
-                               printk("%s: Memory squeeze, dropping packet.\n", dev->name);
+                               printk(KERN_ERR "%s: Memory squeeze, "
+                                      "dropping packet.\n",
+                                      dev->name);
                                dev->stats.rx_dropped++;
                                break;
                        }
@@ -863,7 +872,6 @@ static void el16_rx(struct net_device *dev)
 
                        skb->protocol=eth_type_trans(skb,dev);
                        netif_rx(skb);
-                       dev->last_rx = jiffies;
                        dev->stats.rx_packets++;
                        dev->stats.rx_bytes += pkt_len;
                }
@@ -935,14 +943,3 @@ cleanup_module(void)
 }
 #endif /* MODULE */
 MODULE_LICENSE("GPL");
-
-
-/*
- * Local variables:
- *  compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -I/usr/src/linux/drivers/net -Wall -Wstrict-prototypes -O6 -m486 -c 3c507.c"
- *  version-control: t
- *  kept-new-versions: 5
- *  tab-width: 4
- *  c-indent-level: 4
- * End:
- */