aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/ath5k.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/ath5k.h')
-rw-r--r--drivers/net/wireless/ath/ath5k/ath5k.h37
1 files changed, 29 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
index 60c6d2edc4b9..813718210338 100644
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -209,7 +209,6 @@
209#define AR5K_TUNE_MAX_TXPOWER 63 209#define AR5K_TUNE_MAX_TXPOWER 63
210#define AR5K_TUNE_DEFAULT_TXPOWER 25 210#define AR5K_TUNE_DEFAULT_TXPOWER 25
211#define AR5K_TUNE_TPC_TXPOWER false 211#define AR5K_TUNE_TPC_TXPOWER false
212#define AR5K_TUNE_ANT_DIVERSITY true
213#define AR5K_TUNE_HWTXTRIES 4 212#define AR5K_TUNE_HWTXTRIES 4
214 213
215#define AR5K_INIT_CARR_SENSE_EN 1 214#define AR5K_INIT_CARR_SENSE_EN 1
@@ -420,6 +419,17 @@ enum ath5k_driver_mode {
420 AR5K_MODE_MAX = 5 419 AR5K_MODE_MAX = 5
421}; 420};
422 421
422enum ath5k_ant_mode {
423 AR5K_ANTMODE_DEFAULT = 0, /* default antenna setup */
424 AR5K_ANTMODE_FIXED_A = 1, /* only antenna A is present */
425 AR5K_ANTMODE_FIXED_B = 2, /* only antenna B is present */
426 AR5K_ANTMODE_SINGLE_AP = 3, /* sta locked on a single ap */
427 AR5K_ANTMODE_SECTOR_AP = 4, /* AP with tx antenna set on tx desc */
428 AR5K_ANTMODE_SECTOR_STA = 5, /* STA with tx antenna set on tx desc */
429 AR5K_ANTMODE_DEBUG = 6, /* Debug mode -A -> Rx, B-> Tx- */
430 AR5K_ANTMODE_MAX,
431};
432
423 433
424/****************\ 434/****************\
425 TX DEFINITIONS 435 TX DEFINITIONS
@@ -1051,8 +1061,11 @@ struct ath5k_hw {
1051 bool ah_software_retry; 1061 bool ah_software_retry;
1052 u32 ah_limit_tx_retries; 1062 u32 ah_limit_tx_retries;
1053 1063
1054 u32 ah_antenna[AR5K_EEPROM_N_MODES][AR5K_ANT_MAX]; 1064 /* Antenna Control */
1055 bool ah_ant_diversity; 1065 u32 ah_ant_ctl[AR5K_EEPROM_N_MODES][AR5K_ANT_MAX];
1066 u8 ah_ant_mode;
1067 u8 ah_tx_ant;
1068 u8 ah_def_ant;
1056 1069
1057 u8 ah_sta_id[ETH_ALEN]; 1070 u8 ah_sta_id[ETH_ALEN];
1058 1071
@@ -1100,11 +1113,12 @@ struct ath5k_hw {
1100 /* Values in 0.25dB units */ 1113 /* Values in 0.25dB units */
1101 s16 txp_min_pwr; 1114 s16 txp_min_pwr;
1102 s16 txp_max_pwr; 1115 s16 txp_max_pwr;
1116 /* Values in 0.5dB units */
1103 s16 txp_offset; 1117 s16 txp_offset;
1104 s16 txp_ofdm; 1118 s16 txp_ofdm;
1105 /* Values in dB units */
1106 s16 txp_cck_ofdm_pwr_delta;
1107 s16 txp_cck_ofdm_gainf_delta; 1119 s16 txp_cck_ofdm_gainf_delta;
1120 /* Value in dB units */
1121 s16 txp_cck_ofdm_pwr_delta;
1108 } ah_txpower; 1122 } ah_txpower;
1109 1123
1110 struct { 1124 struct {
@@ -1264,14 +1278,21 @@ extern int ath5k_hw_channel(struct ath5k_hw *ah, struct ieee80211_channel *chann
1264/* PHY calibration */ 1278/* PHY calibration */
1265extern int ath5k_hw_phy_calibrate(struct ath5k_hw *ah, struct ieee80211_channel *channel); 1279extern int ath5k_hw_phy_calibrate(struct ath5k_hw *ah, struct ieee80211_channel *channel);
1266extern int ath5k_hw_noise_floor_calibration(struct ath5k_hw *ah, short freq); 1280extern int ath5k_hw_noise_floor_calibration(struct ath5k_hw *ah, short freq);
1281/* Spur mitigation */
1282bool ath5k_hw_chan_has_spur_noise(struct ath5k_hw *ah,
1283 struct ieee80211_channel *channel);
1284void ath5k_hw_set_spur_mitigation_filter(struct ath5k_hw *ah,
1285 struct ieee80211_channel *channel);
1267/* Misc PHY functions */ 1286/* Misc PHY functions */
1268extern u16 ath5k_hw_radio_revision(struct ath5k_hw *ah, unsigned int chan); 1287extern u16 ath5k_hw_radio_revision(struct ath5k_hw *ah, unsigned int chan);
1269extern void ath5k_hw_set_def_antenna(struct ath5k_hw *ah, unsigned int ant);
1270extern unsigned int ath5k_hw_get_def_antenna(struct ath5k_hw *ah);
1271extern int ath5k_hw_phy_disable(struct ath5k_hw *ah); 1288extern int ath5k_hw_phy_disable(struct ath5k_hw *ah);
1289/* Antenna control */
1290extern void ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode);
1291extern void ath5k_hw_set_def_antenna(struct ath5k_hw *ah, u8 ant);
1292extern unsigned int ath5k_hw_get_def_antenna(struct ath5k_hw *ah);
1272/* TX power setup */ 1293/* TX power setup */
1273extern int ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel, u8 ee_mode, u8 txpower); 1294extern int ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel, u8 ee_mode, u8 txpower);
1274extern int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 ee_mode, u8 txpower); 1295extern int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 txpower);
1275 1296
1276/* 1297/*
1277 * Functions used internaly 1298 * Functions used internaly