diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2007-02-08 13:19:34 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2007-02-08 13:19:34 +0000 |
commit | 773ea5684c87cc803d1a5f73a3e92721c6d73783 (patch) | |
tree | bb569410aa803efe2ad67c8ebab24880f7188ea1 /target/linux | |
parent | 4d9aa791d89f22de11eebb28cbc2207702f1c76b (diff) | |
download | mtk-20170518-773ea5684c87cc803d1a5f73a3e92721c6d73783.zip mtk-20170518-773ea5684c87cc803d1a5f73a3e92721c6d73783.tar.gz mtk-20170518-773ea5684c87cc803d1a5f73a3e92721c6d73783.tar.bz2 |
fix mac handling, thanks to Kestutis Kupciunas
SVN-Revision: 6278
Diffstat (limited to 'target/linux')
-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 82e9e94..bf62c78 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; |