1 --- a/include/linux/ath9k_platform.h
2 +++ b/include/linux/ath9k_platform.h
5 struct ath9k_platform_data {
6 u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS];
10 #endif /* _LINUX_ATH9K_PLATFORM_H */
11 --- a/drivers/net/wireless/ath/ath9k/init.c
12 +++ b/drivers/net/wireless/ath/ath9k/init.c
16 #include <linux/slab.h>
17 +#include <linux/ath9k_platform.h>
21 @@ -522,6 +523,7 @@ static void ath9k_init_misc(struct ath_s
22 static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid,
23 const struct ath_bus_ops *bus_ops)
25 + struct ath9k_platform_data *pdata = sc->dev->platform_data;
26 struct ath_hw *ah = NULL;
27 struct ath_common *common;
29 @@ -535,7 +537,7 @@ static int ath9k_init_softc(u16 devid, s
30 ah->hw_version.subsysid = subsysid;
33 - if (!sc->dev->platform_data)
35 ah->ah_flags |= AH_USE_EEPROM;
37 common = ath9k_hw_common(ah);
38 @@ -568,6 +570,9 @@ static int ath9k_init_softc(u16 devid, s
42 + if (pdata && pdata->macaddr)
43 + memcpy(common->macaddr, pdata->macaddr, ETH_ALEN);
45 ret = ath9k_init_queues(sc);