V4L/DVB (9540): dsbr100: add disabled controls and fix version
[safe/jmp/linux-2.6] / drivers / net / ni5010.c
index 1dc74a7..539e18a 100644 (file)
@@ -268,8 +268,9 @@ static int __init ni5010_probe1(struct net_device *dev, int ioaddr)
 
        for (i=0; i<6; i++) {
                outw(i, IE_GP);
-               printk("%2.2x ", dev->dev_addr[i] = inb(IE_SAPROM));
+               dev->dev_addr[i] = inb(IE_SAPROM);
        }
+       printk("%pM ", dev->dev_addr);
 
        PRINTK2((KERN_DEBUG "%s: I/O #4 passed!\n", dev->name));
 
@@ -327,7 +328,7 @@ static int __init ni5010_probe1(struct net_device *dev, int ioaddr)
                outb(0, IE_RBUF);       /* set buffer byte 0 to 0 again */
        }
         printk("-> bufsize rcv/xmt=%d/%d\n", bufsize_rcv, NI5010_BUFSIZE);
-       memset(dev->priv, 0, sizeof(struct ni5010_local));
+       memset(netdev_priv(dev), 0, sizeof(struct ni5010_local));
 
        dev->open               = ni5010_open;
        dev->stop               = ni5010_close;
@@ -516,7 +517,6 @@ static void dump_packet(void *buf, int len)
 /* We have a good packet, get it out of the buffer. */
 static void ni5010_rx(struct net_device *dev)
 {
-       struct ni5010_local *lp = netdev_priv(dev);
        int ioaddr = dev->base_addr;
        unsigned char rcv_stat;
        struct sk_buff *skb;
@@ -569,13 +569,11 @@ static void ni5010_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 += i_pkt_size;
 
        PRINTK2((KERN_DEBUG "%s: Received packet, size=%#4.4x\n",
                dev->name, i_pkt_size));
-
 }
 
 static int process_xmt_interrupt(struct net_device *dev)
@@ -648,7 +646,6 @@ static void ni5010_set_multicast_list(struct net_device *dev)
        PRINTK2((KERN_DEBUG "%s: entering set_multicast_list\n", dev->name));
 
        if (dev->flags&IFF_PROMISC || dev->flags&IFF_ALLMULTI || dev->mc_list) {
-               dev->flags |= IFF_PROMISC;
                outb(RMD_PROMISC, EDLC_RMODE); /* Enable promiscuous mode */
                PRINTK((KERN_DEBUG "%s: Entering promiscuous mode\n", dev->name));
        } else {
@@ -769,12 +766,3 @@ module_init(ni5010_init_module);
 module_exit(ni5010_cleanup_module);
 #endif /* MODULE */
 MODULE_LICENSE("GPL");
-
-/*
- * Local variables:
- *  compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -Wall -Wstrict-prototypes -O6 -m486 -c ni5010.c"
- *  version-control: t
- *  kept-new-versions: 5
- *  tab-width: 4
- * End:
- */