diff options
Diffstat (limited to 'drivers/net/wireless/ath5k/ath5k.h')
-rw-r--r-- | drivers/net/wireless/ath5k/ath5k.h | 51 |
1 files changed, 11 insertions, 40 deletions
diff --git a/drivers/net/wireless/ath5k/ath5k.h b/drivers/net/wireless/ath5k/ath5k.h index 0eda785fe62f..c870e2ae575a 100644 --- a/drivers/net/wireless/ath5k/ath5k.h +++ b/drivers/net/wireless/ath5k/ath5k.h | |||
@@ -649,49 +649,21 @@ struct ath5k_beacon_state { | |||
649 | 649 | ||
650 | enum ath5k_rfgain { | 650 | enum ath5k_rfgain { |
651 | AR5K_RFGAIN_INACTIVE = 0, | 651 | AR5K_RFGAIN_INACTIVE = 0, |
652 | AR5K_RFGAIN_ACTIVE, | ||
652 | AR5K_RFGAIN_READ_REQUESTED, | 653 | AR5K_RFGAIN_READ_REQUESTED, |
653 | AR5K_RFGAIN_NEED_CHANGE, | 654 | AR5K_RFGAIN_NEED_CHANGE, |
654 | }; | 655 | }; |
655 | 656 | ||
656 | #define AR5K_GAIN_CRN_FIX_BITS_5111 4 | ||
657 | #define AR5K_GAIN_CRN_FIX_BITS_5112 7 | ||
658 | #define AR5K_GAIN_CRN_MAX_FIX_BITS AR5K_GAIN_CRN_FIX_BITS_5112 | ||
659 | #define AR5K_GAIN_DYN_ADJUST_HI_MARGIN 15 | ||
660 | #define AR5K_GAIN_DYN_ADJUST_LO_MARGIN 20 | ||
661 | #define AR5K_GAIN_CCK_PROBE_CORR 5 | ||
662 | #define AR5K_GAIN_CCK_OFDM_GAIN_DELTA 15 | ||
663 | #define AR5K_GAIN_STEP_COUNT 10 | ||
664 | #define AR5K_GAIN_PARAM_TX_CLIP 0 | ||
665 | #define AR5K_GAIN_PARAM_PD_90 1 | ||
666 | #define AR5K_GAIN_PARAM_PD_84 2 | ||
667 | #define AR5K_GAIN_PARAM_GAIN_SEL 3 | ||
668 | #define AR5K_GAIN_PARAM_MIX_ORN 0 | ||
669 | #define AR5K_GAIN_PARAM_PD_138 1 | ||
670 | #define AR5K_GAIN_PARAM_PD_137 2 | ||
671 | #define AR5K_GAIN_PARAM_PD_136 3 | ||
672 | #define AR5K_GAIN_PARAM_PD_132 4 | ||
673 | #define AR5K_GAIN_PARAM_PD_131 5 | ||
674 | #define AR5K_GAIN_PARAM_PD_130 6 | ||
675 | #define AR5K_GAIN_CHECK_ADJUST(_g) \ | ||
676 | ((_g)->g_current <= (_g)->g_low || (_g)->g_current >= (_g)->g_high) | ||
677 | |||
678 | struct ath5k_gain_opt_step { | ||
679 | s16 gos_param[AR5K_GAIN_CRN_MAX_FIX_BITS]; | ||
680 | s32 gos_gain; | ||
681 | }; | ||
682 | |||
683 | struct ath5k_gain { | 657 | struct ath5k_gain { |
684 | u32 g_step_idx; | 658 | u8 g_step_idx; |
685 | u32 g_current; | 659 | u8 g_current; |
686 | u32 g_target; | 660 | u8 g_target; |
687 | u32 g_low; | 661 | u8 g_low; |
688 | u32 g_high; | 662 | u8 g_high; |
689 | u32 g_f_corr; | 663 | u8 g_f_corr; |
690 | u32 g_active; | 664 | u8 g_state; |
691 | const struct ath5k_gain_opt_step *g_step; | ||
692 | }; | 665 | }; |
693 | 666 | ||
694 | |||
695 | /********************\ | 667 | /********************\ |
696 | COMMON DEFINITIONS | 668 | COMMON DEFINITIONS |
697 | \********************/ | 669 | \********************/ |
@@ -1053,7 +1025,6 @@ struct ath5k_hw { | |||
1053 | bool ah_running; | 1025 | bool ah_running; |
1054 | bool ah_single_chip; | 1026 | bool ah_single_chip; |
1055 | bool ah_combined_mic; | 1027 | bool ah_combined_mic; |
1056 | enum ath5k_rfgain ah_rf_gain; | ||
1057 | 1028 | ||
1058 | u32 ah_mac_srev; | 1029 | u32 ah_mac_srev; |
1059 | u16 ah_mac_version; | 1030 | u16 ah_mac_version; |
@@ -1262,9 +1233,9 @@ extern int ath5k_hw_write_initvals(struct ath5k_hw *ah, u8 mode, bool change_cha | |||
1262 | 1233 | ||
1263 | /* Initialize RF */ | 1234 | /* Initialize RF */ |
1264 | extern int ath5k_hw_rfregs(struct ath5k_hw *ah, struct ieee80211_channel *channel, unsigned int mode); | 1235 | extern int ath5k_hw_rfregs(struct ath5k_hw *ah, struct ieee80211_channel *channel, unsigned int mode); |
1265 | extern int ath5k_hw_rfgain(struct ath5k_hw *ah, unsigned int freq); | 1236 | extern int ath5k_hw_rfgain_init(struct ath5k_hw *ah, unsigned int freq); |
1266 | extern enum ath5k_rfgain ath5k_hw_get_rf_gain(struct ath5k_hw *ah); | 1237 | extern enum ath5k_rfgain ath5k_hw_gainf_calibrate(struct ath5k_hw *ah); |
1267 | extern int ath5k_hw_set_rfgain_opt(struct ath5k_hw *ah); | 1238 | extern int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah); |
1268 | /* PHY/RF channel functions */ | 1239 | /* PHY/RF channel functions */ |
1269 | extern bool ath5k_channel_ok(struct ath5k_hw *ah, u16 freq, unsigned int flags); | 1240 | extern bool ath5k_channel_ok(struct ath5k_hw *ah, u16 freq, unsigned int flags); |
1270 | extern int ath5k_hw_channel(struct ath5k_hw *ah, struct ieee80211_channel *channel); | 1241 | extern int ath5k_hw_channel(struct ath5k_hw *ah, struct ieee80211_channel *channel); |