summaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ar913x-wmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ar71xx/dev-ar913x-wmac.c')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/dev-ar913x-wmac.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ar913x-wmac.c b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ar913x-wmac.c
index 342f8de28..67eaa833b 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ar913x-wmac.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ar913x-wmac.c
@@ -22,6 +22,9 @@
#include "dev-ar913x-wmac.h"
+static struct ath9k_platform_data ar913x_wmac_data;
+static char ar913x_wmac_mac[6];
+
static struct resource ar913x_wmac_resources[] = {
{
.start = AR91XX_WMAC_BASE,
@@ -34,8 +37,6 @@ static struct resource ar913x_wmac_resources[] = {
},
};
-static struct ath9k_platform_data ar913x_wmac_data;
-
static struct platform_device ar913x_wmac_device = {
.name = "ath9k",
.id = -1,
@@ -46,12 +47,16 @@ static struct platform_device ar913x_wmac_device = {
},
};
-void __init ar913x_add_device_wmac(void)
+void __init ar913x_add_device_wmac(u8 *cal_data, u8 *mac_addr)
{
- u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+ if (cal_data)
+ memcpy(ar913x_wmac_data.eeprom_data, cal_data,
+ sizeof(ar913x_wmac_data.eeprom_data));
- memcpy(ar913x_wmac_data.eeprom_data, ee,
- sizeof(ar913x_wmac_data.eeprom_data));
+ if (mac_addr) {
+ memcpy(ar913x_wmac_mac, mac_addr, sizeof(ar913x_wmac_mac));
+ ar913x_wmac_data.macaddr = ar913x_wmac_mac;
+ }
ar71xx_device_stop(RESET_MODULE_AMBA2WMAC);
mdelay(10);