1 --- a/arch/mips/ath79/dev-wmac.c
2 +++ b/arch/mips/ath79/dev-wmac.c
4 #include <linux/init.h>
5 #include <linux/delay.h>
7 +#include <linux/etherdevice.h>
8 #include <linux/platform_device.h>
9 #include <linux/ath9k_platform.h>
12 #include <asm/mach-ath79/ar71xx_regs.h>
15 +static u8 ath79_wmac_mac[ETH_ALEN];
16 static struct ath9k_platform_data ath79_wmac_data;
18 static struct resource ath79_wmac_resources[] = {
19 @@ -116,7 +118,7 @@ static void ar934x_wmac_setup(void)
20 ath79_wmac_data.is_clk_25mhz = true;
23 -void __init ath79_register_wmac(u8 *cal_data)
24 +void __init ath79_register_wmac(u8 *cal_data, u8 *mac_addr)
28 @@ -131,5 +133,10 @@ void __init ath79_register_wmac(u8 *cal_
29 memcpy(ath79_wmac_data.eeprom_data, cal_data,
30 sizeof(ath79_wmac_data.eeprom_data));
33 + memcpy(ath79_wmac_mac, mac_addr, sizeof(ath79_wmac_mac));
34 + ath79_wmac_data.macaddr = ath79_wmac_mac;
37 platform_device_register(&ath79_wmac_device);
39 --- a/arch/mips/ath79/dev-wmac.h
40 +++ b/arch/mips/ath79/dev-wmac.h
42 #ifndef _ATH79_DEV_WMAC_H
43 #define _ATH79_DEV_WMAC_H
45 -void ath79_register_wmac(u8 *cal_data);
46 +void ath79_register_wmac(u8 *cal_data, u8 *mac_addr);
48 #endif /* _ATH79_DEV_WMAC_H */
49 --- a/arch/mips/ath79/mach-ap81.c
50 +++ b/arch/mips/ath79/mach-ap81.c
51 @@ -98,7 +98,7 @@ static void __init ap81_setup(void)
53 ath79_register_spi(&ap81_spi_data, ap81_spi_info,
54 ARRAY_SIZE(ap81_spi_info));
55 - ath79_register_wmac(cal_data);
56 + ath79_register_wmac(cal_data, NULL);
60 --- a/arch/mips/ath79/mach-db120.c
61 +++ b/arch/mips/ath79/mach-db120.c
62 @@ -153,7 +153,7 @@ static void __init db120_setup(void)
63 ath79_register_spi(&db120_spi_data, db120_spi_info,
64 ARRAY_SIZE(db120_spi_info));
66 - ath79_register_wmac(art + DB120_WMAC_CALDATA_OFFSET);
67 + ath79_register_wmac(art + DB120_WMAC_CALDATA_OFFSET, NULL);
68 db120_pci_init(art + DB120_PCIE_CALDATA_OFFSET);
71 --- a/arch/mips/ath79/mach-ap121.c
72 +++ b/arch/mips/ath79/mach-ap121.c
73 @@ -91,7 +91,7 @@ static void __init ap121_setup(void)
74 ath79_register_spi(&ap121_spi_data, ap121_spi_info,
75 ARRAY_SIZE(ap121_spi_info));
77 - ath79_register_wmac(cal_data);
78 + ath79_register_wmac(cal_data, NULL);
81 MIPS_MACHINE(ATH79_MACH_AP121, "AP121", "Atheros AP121 reference board",