1 --- a/drivers/net/wireless/ath/ath5k/pci.c
2 +++ b/drivers/net/wireless/ath/ath5k/pci.c
4 #include <linux/pci-aspm.h>
5 #include <linux/etherdevice.h>
6 #include <linux/module.h>
7 +#include <linux/ath5k_platform.h>
11 @@ -69,7 +70,7 @@ static void ath5k_pci_read_cachesize(str
16 + * Read from eeprom or platform_data
19 ath5k_pci_eeprom_read(struct ath_common *common, u32 offset, u16 *data)
20 @@ -77,6 +78,19 @@ ath5k_pci_eeprom_read(struct ath_common
21 struct ath5k_hw *ah = (struct ath5k_hw *) common->ah;
24 + struct ath5k_platform_data *pdata = NULL;
27 + pdata = ah->pdev->dev.platform_data;
29 + if (pdata && pdata->eeprom_data && pdata->eeprom_data[61] == AR5K_EEPROM_MAGIC_VALUE) {
30 + if (offset >= ATH5K_PLAT_EEP_MAX_WORDS)
33 + *data = pdata->eeprom_data[offset];
38 * Initialize EEPROM access
40 @@ -120,6 +134,16 @@ static int ath5k_pci_eeprom_read_mac(str
44 + struct ath5k_platform_data *pdata = NULL;
47 + pdata = ah->pdev->dev.platform_data;
49 + if (pdata && pdata->macaddr) {
50 + memcpy(mac, pdata->macaddr, ETH_ALEN);
54 AR5K_EEPROM_READ(0x20, data);
56 for (offset = 0x1f, octet = 0, total = 0; offset >= 0x1d; offset--) {