]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/r6040.c
Merge branches 'x86/acpi', 'x86/asm', 'x86/cpudetect', 'x86/crashdump', 'x86/debug...
[linux-2.6-omap-h63xx.git] / drivers / net / r6040.c
index b59837e80750bb351ee4be0d7b11c04c47b29b62..b2dcdb5ed8bde1b3ca424ad17fb310c4b5a2ba5e 100644 (file)
@@ -49,8 +49,8 @@
 #include <asm/processor.h>
 
 #define DRV_NAME       "r6040"
-#define DRV_VERSION    "0.20"
-#define DRV_RELDATE    "07Jan2009"
+#define DRV_VERSION    "0.21"
+#define DRV_RELDATE    "09Jan2009"
 
 /* PHY CHIP Address */
 #define PHY1_ADDR      1       /* For MAC1 */
@@ -438,7 +438,6 @@ static void r6040_down(struct net_device *dev)
 {
        struct r6040_private *lp = netdev_priv(dev);
        void __iomem *ioaddr = lp->base;
-       struct pci_dev *pdev = lp->pdev;
        int limit = 2048;
        u16 *adrp;
        u16 cmd;
@@ -1059,6 +1058,7 @@ static const struct net_device_ops r6040_netdev_ops = {
        .ndo_set_multicast_list = r6040_multicast_list,
        .ndo_change_mtu         = eth_change_mtu,
        .ndo_validate_addr      = eth_validate_addr,
+       .ndo_set_mac_address    = eth_mac_addr,
        .ndo_do_ioctl           = r6040_ioctl,
        .ndo_tx_timeout         = r6040_tx_timeout,
 #ifdef CONFIG_NET_POLL_CONTROLLER
@@ -1153,8 +1153,10 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
 
        /* Some bootloader/BIOSes do not initialize
         * MAC address, warn about that */
-       if (!(adrp[0] || adrp[1] || adrp[2]))
-               printk(KERN_WARNING DRV_NAME ": MAC address not initialized\n");
+       if (!(adrp[0] || adrp[1] || adrp[2])) {
+               printk(KERN_WARNING DRV_NAME ": MAC address not initialized, generating random\n");
+               random_ether_addr(dev->dev_addr);
+       }
 
        /* Link new device into r6040_root_dev */
        lp->pdev = pdev;