diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/eeprom.h')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h index 2f2993b50e2f..21354c15a9a9 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.h +++ b/drivers/net/wireless/ath/ath9k/eeprom.h | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include "../ath.h" | 20 | #include "../ath.h" |
21 | #include <net/cfg80211.h> | 21 | #include <net/cfg80211.h> |
22 | #include "ar9003_eeprom.h" | ||
22 | 23 | ||
23 | #define AH_USE_EEPROM 0x1 | 24 | #define AH_USE_EEPROM 0x1 |
24 | 25 | ||
@@ -93,7 +94,6 @@ | |||
93 | */ | 94 | */ |
94 | #define AR9285_RDEXT_DEFAULT 0x1F | 95 | #define AR9285_RDEXT_DEFAULT 0x1F |
95 | 96 | ||
96 | #define AR_EEPROM_MAC(i) (0x1d+(i)) | ||
97 | #define ATH9K_POW_SM(_r, _s) (((_r) & 0x3f) << (_s)) | 97 | #define ATH9K_POW_SM(_r, _s) (((_r) & 0x3f) << (_s)) |
98 | #define FREQ2FBIN(x, y) ((y) ? ((x) - 2300) : (((x) - 4800) / 5)) | 98 | #define FREQ2FBIN(x, y) ((y) ? ((x) - 2300) : (((x) - 4800) / 5)) |
99 | #define ath9k_hw_use_flash(_ah) (!(_ah->ah_flags & AH_USE_EEPROM)) | 99 | #define ath9k_hw_use_flash(_ah) (!(_ah->ah_flags & AH_USE_EEPROM)) |
@@ -155,6 +155,7 @@ | |||
155 | #define AR5416_BCHAN_UNUSED 0xFF | 155 | #define AR5416_BCHAN_UNUSED 0xFF |
156 | #define AR5416_MAX_PWR_RANGE_IN_HALF_DB 64 | 156 | #define AR5416_MAX_PWR_RANGE_IN_HALF_DB 64 |
157 | #define AR5416_MAX_CHAINS 3 | 157 | #define AR5416_MAX_CHAINS 3 |
158 | #define AR9300_MAX_CHAINS 3 | ||
158 | #define AR5416_PWR_TABLE_OFFSET_DB -5 | 159 | #define AR5416_PWR_TABLE_OFFSET_DB -5 |
159 | 160 | ||
160 | /* Rx gain type values */ | 161 | /* Rx gain type values */ |
@@ -249,16 +250,20 @@ enum eeprom_param { | |||
249 | EEP_MINOR_REV, | 250 | EEP_MINOR_REV, |
250 | EEP_TX_MASK, | 251 | EEP_TX_MASK, |
251 | EEP_RX_MASK, | 252 | EEP_RX_MASK, |
253 | EEP_FSTCLK_5G, | ||
252 | EEP_RXGAIN_TYPE, | 254 | EEP_RXGAIN_TYPE, |
253 | EEP_TXGAIN_TYPE, | ||
254 | EEP_OL_PWRCTRL, | 255 | EEP_OL_PWRCTRL, |
256 | EEP_TXGAIN_TYPE, | ||
255 | EEP_RC_CHAIN_MASK, | 257 | EEP_RC_CHAIN_MASK, |
256 | EEP_DAC_HPWR_5G, | 258 | EEP_DAC_HPWR_5G, |
257 | EEP_FRAC_N_5G, | 259 | EEP_FRAC_N_5G, |
258 | EEP_DEV_TYPE, | 260 | EEP_DEV_TYPE, |
259 | EEP_TEMPSENSE_SLOPE, | 261 | EEP_TEMPSENSE_SLOPE, |
260 | EEP_TEMPSENSE_SLOPE_PAL_ON, | 262 | EEP_TEMPSENSE_SLOPE_PAL_ON, |
261 | EEP_PWR_TABLE_OFFSET | 263 | EEP_PWR_TABLE_OFFSET, |
264 | EEP_DRIVE_STRENGTH, | ||
265 | EEP_INTERNAL_REGULATOR, | ||
266 | EEP_SWREG | ||
262 | }; | 267 | }; |
263 | 268 | ||
264 | enum ar5416_rates { | 269 | enum ar5416_rates { |
@@ -295,7 +300,8 @@ struct base_eep_header { | |||
295 | u32 binBuildNumber; | 300 | u32 binBuildNumber; |
296 | u8 deviceType; | 301 | u8 deviceType; |
297 | u8 pwdclkind; | 302 | u8 pwdclkind; |
298 | u8 futureBase_1[2]; | 303 | u8 fastClk5g; |
304 | u8 divChain; | ||
299 | u8 rxGainType; | 305 | u8 rxGainType; |
300 | u8 dacHiPwrMode_5G; | 306 | u8 dacHiPwrMode_5G; |
301 | u8 openLoopPwrCntl; | 307 | u8 openLoopPwrCntl; |
@@ -656,13 +662,6 @@ struct ath9k_country_entry { | |||
656 | u8 iso[3]; | 662 | u8 iso[3]; |
657 | }; | 663 | }; |
658 | 664 | ||
659 | enum ath9k_eep_map { | ||
660 | EEP_MAP_DEFAULT = 0x0, | ||
661 | EEP_MAP_4KBITS, | ||
662 | EEP_MAP_AR9287, | ||
663 | EEP_MAP_MAX | ||
664 | }; | ||
665 | |||
666 | struct eeprom_ops { | 665 | struct eeprom_ops { |
667 | int (*check_eeprom)(struct ath_hw *hw); | 666 | int (*check_eeprom)(struct ath_hw *hw); |
668 | u32 (*get_eeprom)(struct ath_hw *hw, enum eeprom_param param); | 667 | u32 (*get_eeprom)(struct ath_hw *hw, enum eeprom_param param); |
@@ -713,6 +712,8 @@ int ath9k_hw_eeprom_init(struct ath_hw *ah); | |||
713 | 712 | ||
714 | extern const struct eeprom_ops eep_def_ops; | 713 | extern const struct eeprom_ops eep_def_ops; |
715 | extern const struct eeprom_ops eep_4k_ops; | 714 | extern const struct eeprom_ops eep_4k_ops; |
716 | extern const struct eeprom_ops eep_AR9287_ops; | 715 | extern const struct eeprom_ops eep_ar9287_ops; |
716 | extern const struct eeprom_ops eep_ar9287_ops; | ||
717 | extern const struct eeprom_ops eep_ar9300_ops; | ||
717 | 718 | ||
718 | #endif /* EEPROM_H */ | 719 | #endif /* EEPROM_H */ |