fix mac handling, thanks to Kestutis Kupciunas
authorImre Kaloz <kaloz@openwrt.org>
Thu, 8 Feb 2007 13:19:34 +0000 (13:19 +0000)
committerImre Kaloz <kaloz@openwrt.org>
Thu, 8 Feb 2007 13:19:34 +0000 (13:19 +0000)
SVN-Revision: 6278

target/linux/atheros-2.6/files/drivers/net/ar2313/ar2313.c

index 82e9e94d5c5de89667706a8050570bcecbac23e2..bf62c78b13bb3ccfeaaca74c1963495e6d3f9c7f 100644 (file)
@@ -296,7 +296,10 @@ int __init ar2313_probe(struct platform_device *pdev)
                        memcpy(dev->dev_addr, def_mac, 6);
                } else {
                        memcpy(dev->dev_addr, ((u8 *)configstart)+102, 6);
-           }
+                       /* use the other MAC slot if the first one is empty */
+                       if (!memcmp(dev->dev_addr, "\xff\xff\xff\xff\xff\xff", 6))
+                               memcpy(dev->dev_addr, ((u8 *)configstart)+102 + 6, 6);
+               }
        }
 
        sp->board_idx = BOARD_IDX_STATIC;