diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-12-10 15:46:15 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-12-10 15:46:15 +0000 |
commit | 23fe7d4e4f141228f550ebb73d9f206f2207bdfe (patch) | |
tree | 71035955e3316c23993431b787701ea3e413c882 /package/mac80211/patches/501-ath9k-eeprom_endianess.patch | |
parent | f7b644774fa7d6db2962e30f5e9d57c298b8669e (diff) | |
download | upstream-23fe7d4e4f141228f550ebb73d9f206f2207bdfe.tar.gz upstream-23fe7d4e4f141228f550ebb73d9f206f2207bdfe.tar.bz2 upstream-23fe7d4e4f141228f550ebb73d9f206f2207bdfe.zip |
mac80211: ath9k: allow to load EEPROM data via firmware API
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34606 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/501-ath9k-eeprom_endianess.patch')
-rw-r--r-- | package/mac80211/patches/501-ath9k-eeprom_endianess.patch | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/package/mac80211/patches/501-ath9k-eeprom_endianess.patch b/package/mac80211/patches/501-ath9k-eeprom_endianess.patch index 9d7385de7a..20282573f8 100644 --- a/package/mac80211/patches/501-ath9k-eeprom_endianess.patch +++ b/package/mac80211/patches/501-ath9k-eeprom_endianess.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c -@@ -266,7 +266,7 @@ static int ath9k_hw_def_check_eeprom(str +@@ -262,7 +262,7 @@ static int ath9k_hw_def_check_eeprom(str { struct ar5416_eeprom_def *eep = &ah->eeprom.def; struct ath_common *common = ath9k_hw_common(ah); @@ -9,7 +9,7 @@ u32 sum = 0, el; bool need_swap = false; int i, addr, size; -@@ -276,27 +276,16 @@ static int ath9k_hw_def_check_eeprom(str +@@ -272,27 +272,16 @@ static int ath9k_hw_def_check_eeprom(str return false; } @@ -49,29 +49,29 @@ --- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c -@@ -195,7 +195,7 @@ static int ath9k_hw_4k_check_eeprom(stru - int i, addr; - +@@ -57,7 +57,7 @@ static bool ath9k_hw_4k_fill_eeprom(stru + { + struct ath_common *common = ath9k_hw_common(ah); - if (!ath9k_hw_use_flash(ah)) { + if (!(ah->ah_flags & AH_NO_EEP_SWAP)) { - if (!ath9k_hw_nvram_read(common, AR5416_EEPROM_MAGIC_OFFSET, - &magic)) { - ath_err(common, "Reading Magic # failed\n"); + ath_dbg(common, EEPROM, "Reading from EEPROM, not flash\n"); + } + --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c -@@ -189,7 +189,7 @@ static int ath9k_hw_ar9287_check_eeprom( - struct ar9287_eeprom *eep = &ah->eeprom.map9287; +@@ -60,7 +60,7 @@ static bool ath9k_hw_ar9287_fill_eeprom( + { struct ath_common *common = ath9k_hw_common(ah); - if (!ath9k_hw_use_flash(ah)) { + if (!(ah->ah_flags & AH_NO_EEP_SWAP)) { - if (!ath9k_hw_nvram_read(common, AR5416_EEPROM_MAGIC_OFFSET, - &magic)) { - ath_err(common, "Reading Magic # failed\n"); + ath_dbg(common, EEPROM, "Reading from EEPROM, not flash\n"); + } + --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h -@@ -704,6 +704,7 @@ enum ath_cal_list { +@@ -705,6 +705,7 @@ enum ath_cal_list { #define AH_USE_EEPROM 0x1 #define AH_UNPLUGGED 0x2 /* The card has been physically removed. */ #define AH_FASTCC 0x4 @@ -81,7 +81,7 @@ struct ath_ops reg_ops; --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -541,6 +541,8 @@ static int ath9k_init_softc(u16 devid, s +@@ -591,6 +591,8 @@ static int ath9k_init_softc(u16 devid, s ah->is_clk_25mhz = pdata->is_clk_25mhz; ah->get_mac_revision = pdata->get_mac_revision; ah->external_reset = pdata->external_reset; @@ -92,7 +92,7 @@ common = ath9k_hw_common(ah); --- a/include/linux/ath9k_platform.h +++ b/include/linux/ath9k_platform.h -@@ -29,6 +29,7 @@ struct ath9k_platform_data { +@@ -31,6 +31,7 @@ struct ath9k_platform_data { u32 gpio_mask; u32 gpio_val; |