diff options
author | kaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-02-08 13:19:34 +0000 |
---|---|---|
committer | kaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-02-08 13:19:34 +0000 |
commit | 1e162b97a87c1333d54a1a0a98974c8d2b981baf (patch) | |
tree | c30f8cc481eeb7bb10a481a54973698acc844566 | |
parent | e58a0e8a072ecf32b1b5b4c01ca74f349147c605 (diff) |
fix mac handling, thanks to Kestutis Kupciunas
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6278 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | target/linux/atheros-2.6/files/drivers/net/ar2313/ar2313.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/target/linux/atheros-2.6/files/drivers/net/ar2313/ar2313.c b/target/linux/atheros-2.6/files/drivers/net/ar2313/ar2313.c index 82e9e94d5..bf62c78b1 100644 --- a/target/linux/atheros-2.6/files/drivers/net/ar2313/ar2313.c +++ b/target/linux/atheros-2.6/files/drivers/net/ar2313/ar2313.c @@ -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; |