aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/ath9k.h
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-08-07 01:22:38 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-07 09:49:43 -0400
commit60b67f519213cf6d59236d065b0953962b56abca (patch)
tree3af58f097b3899aea9b525c563626930c4cab4b4 /drivers/net/wireless/ath9k/ath9k.h
parentb08cbcd4546445740c2a04291204b56f8baf7be2 (diff)
ath9k: Cleanup data structures related to HW capabilities
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/ath9k.h')
-rw-r--r--drivers/net/wireless/ath9k/ath9k.h183
1 files changed, 92 insertions, 91 deletions
diff --git a/drivers/net/wireless/ath9k/ath9k.h b/drivers/net/wireless/ath9k/ath9k.h
index dc1da64d2d7c..71027dcdcafc 100644
--- a/drivers/net/wireless/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath9k/ath9k.h
@@ -147,94 +147,95 @@ struct ath_desc {
147 147
148#define ATH9K_RXDESC_INTREQ 0x0020 148#define ATH9K_RXDESC_INTREQ 0x0020
149 149
150enum hal_capability_type { 150enum ath9k_hw_caps {
151 HAL_CAP_CIPHER = 0, 151 ATH9K_HW_CAP_CHAN_SPREAD = BIT(0),
152 HAL_CAP_TKIP_MIC, 152 ATH9K_HW_CAP_MIC_AESCCM = BIT(1),
153 HAL_CAP_TKIP_SPLIT, 153 ATH9K_HW_CAP_MIC_CKIP = BIT(2),
154 HAL_CAP_PHYCOUNTERS, 154 ATH9K_HW_CAP_MIC_TKIP = BIT(3),
155 HAL_CAP_DIVERSITY, 155 ATH9K_HW_CAP_CIPHER_AESCCM = BIT(4),
156 HAL_CAP_PSPOLL, 156 ATH9K_HW_CAP_CIPHER_CKIP = BIT(5),
157 HAL_CAP_TXPOW, 157 ATH9K_HW_CAP_CIPHER_TKIP = BIT(6),
158 HAL_CAP_PHYDIAG, 158 ATH9K_HW_CAP_VEOL = BIT(7),
159 HAL_CAP_MCAST_KEYSRCH, 159 ATH9K_HW_CAP_BSSIDMASK = BIT(8),
160 HAL_CAP_TSF_ADJUST, 160 ATH9K_HW_CAP_MCAST_KEYSEARCH = BIT(9),
161 HAL_CAP_WME_TKIPMIC, 161 ATH9K_HW_CAP_CHAN_HALFRATE = BIT(10),
162 HAL_CAP_RFSILENT, 162 ATH9K_HW_CAP_CHAN_QUARTERRATE = BIT(11),
163 HAL_CAP_ANT_CFG_2GHZ, 163 ATH9K_HW_CAP_HT = BIT(12),
164 HAL_CAP_ANT_CFG_5GHZ 164 ATH9K_HW_CAP_GTT = BIT(13),
165 ATH9K_HW_CAP_FASTCC = BIT(14),
166 ATH9K_HW_CAP_RFSILENT = BIT(15),
167 ATH9K_HW_CAP_WOW = BIT(16),
168 ATH9K_HW_CAP_CST = BIT(17),
169 ATH9K_HW_CAP_ENHANCEDPM = BIT(18),
170 ATH9K_HW_CAP_AUTOSLEEP = BIT(19),
171 ATH9K_HW_CAP_4KB_SPLITTRANS = BIT(20),
172 ATH9K_HW_CAP_WOW_MATCHPATTERN_EXACT = BIT(21),
165}; 173};
166 174
167struct hal_capabilities { 175enum ath9k_capability_type {
168 u32 halChanSpreadSupport:1, 176 ATH9K_CAP_CIPHER = 0,
169 halChapTuningSupport:1, 177 ATH9K_CAP_TKIP_MIC,
170 halMicAesCcmSupport:1, 178 ATH9K_CAP_TKIP_SPLIT,
171 halMicCkipSupport:1, 179 ATH9K_CAP_PHYCOUNTERS,
172 halMicTkipSupport:1, 180 ATH9K_CAP_DIVERSITY,
173 halCipherAesCcmSupport:1, 181 ATH9K_CAP_TXPOW,
174 halCipherCkipSupport:1, 182 ATH9K_CAP_PHYDIAG,
175 halCipherTkipSupport:1, 183 ATH9K_CAP_MCAST_KEYSRCH,
176 halVEOLSupport:1, 184 ATH9K_CAP_TSF_ADJUST,
177 halBssIdMaskSupport:1, 185 ATH9K_CAP_WME_TKIPMIC,
178 halMcastKeySrchSupport:1, 186 ATH9K_CAP_RFSILENT,
179 halTsfAddSupport:1, 187 ATH9K_CAP_ANT_CFG_2GHZ,
180 halChanHalfRate:1, 188 ATH9K_CAP_ANT_CFG_5GHZ
181 halChanQuarterRate:1,
182 halHTSupport:1,
183 halGTTSupport:1,
184 halFastCCSupport:1,
185 halRfSilentSupport:1,
186 halWowSupport:1,
187 halCSTSupport:1,
188 halEnhancedPmSupport:1,
189 halAutoSleepSupport:1,
190 hal4kbSplitTransSupport:1,
191 halWowMatchPatternExact:1;
192 u32 halWirelessModes;
193 u16 halTotalQueues;
194 u16 halKeyCacheSize;
195 u16 halLow5GhzChan, halHigh5GhzChan;
196 u16 halLow2GhzChan, halHigh2GhzChan;
197 u16 halNumMRRetries;
198 u16 halRtsAggrLimit;
199 u8 halTxChainMask;
200 u8 halRxChainMask;
201 u16 halTxTrigLevelMax;
202 u16 halRegCap;
203 u8 halNumGpioPins;
204 u8 halNumAntCfg2GHz;
205 u8 halNumAntCfg5GHz;
206}; 189};
207 190
208struct hal_ops_config { 191struct ath9k_hw_capabilities {
209 int ath_hal_dma_beacon_response_time; 192 u32 hw_caps; /* ATH9K_HW_CAP_* from ath9k_hw_caps */
210 int ath_hal_sw_beacon_response_time; 193 u32 wireless_modes;
211 int ath_hal_additional_swba_backoff; 194 u16 total_queues;
212 int ath_hal_6mb_ack; 195 u16 keycache_size;
213 int ath_hal_cwmIgnoreExtCCA; 196 u16 low_5ghz_chan, high_5ghz_chan;
214 u8 ath_hal_pciePowerSaveEnable; 197 u16 low_2ghz_chan, high_2ghz_chan;
215 u8 ath_hal_pcieL1SKPEnable; 198 u16 num_mr_retries;
216 u8 ath_hal_pcieClockReq; 199 u16 rts_aggr_limit;
217 u32 ath_hal_pcieWaen; 200 u8 tx_chainmask;
218 int ath_hal_pciePowerReset; 201 u8 rx_chainmask;
219 u8 ath_hal_pcieRestore; 202 u16 tx_triglevel_max;
220 u8 ath_hal_analogShiftReg; 203 u16 reg_cap;
221 u8 ath_hal_htEnable; 204 u8 num_gpio_pins;
222 u32 ath_hal_ofdmTrigLow; 205 u8 num_antcfg_2ghz;
223 u32 ath_hal_ofdmTrigHigh; 206 u8 num_antcfg_5ghz;
224 u32 ath_hal_cckTrigHigh; 207};
225 u32 ath_hal_cckTrigLow; 208
226 u32 ath_hal_enableANI; 209struct ath9k_ops_config {
227 u8 ath_hal_noiseImmunityLvl; 210 int dma_beacon_response_time;
228 u32 ath_hal_ofdmWeakSigDet; 211 int sw_beacon_response_time;
229 u32 ath_hal_cckWeakSigThr; 212 int additional_swba_backoff;
230 u8 ath_hal_spurImmunityLvl; 213 int ack_6mb;
231 u8 ath_hal_firStepLvl; 214 int cwm_ignore_extcca;
232 int8_t ath_hal_rssiThrHigh; 215 u8 pcie_powersave_enable;
233 int8_t ath_hal_rssiThrLow; 216 u8 pcie_l1skp_enable;
234 u16 ath_hal_diversityControl; 217 u8 pcie_clock_req;
235 u16 ath_hal_antennaSwitchSwap; 218 u32 pcie_waen;
236 int ath_hal_serializeRegMode; 219 int pcie_power_reset;
237 int ath_hal_intrMitigation; 220 u8 pcie_restore;
221 u8 analog_shiftreg;
222 u8 ht_enable;
223 u32 ofdm_trig_low;
224 u32 ofdm_trig_high;
225 u32 cck_trig_high;
226 u32 cck_trig_low;
227 u32 enable_ani;
228 u8 noise_immunity_level;
229 u32 ofdm_weaksignal_det;
230 u32 cck_weaksignal_thr;
231 u8 spur_immunity_level;
232 u8 firstep_level;
233 int8_t rssi_thr_high;
234 int8_t rssi_thr_low;
235 u16 diversity_control;
236 u16 antenna_switch_swap;
237 int serialize_regmode;
238 int intr_mitigation;
238#define SPUR_DISABLE 0 239#define SPUR_DISABLE 0
239#define SPUR_ENABLE_IOCTL 1 240#define SPUR_ENABLE_IOCTL 1
240#define SPUR_ENABLE_EEPROM 2 241#define SPUR_ENABLE_EEPROM 2
@@ -246,8 +247,8 @@ struct hal_ops_config {
246#define AR_BASE_FREQ_5GHZ 4900 247#define AR_BASE_FREQ_5GHZ 4900
247#define AR_SPUR_FEEQ_BOUND_HT40 19 248#define AR_SPUR_FEEQ_BOUND_HT40 19
248#define AR_SPUR_FEEQ_BOUND_HT20 10 249#define AR_SPUR_FEEQ_BOUND_HT20 10
249 int ath_hal_spurMode; 250 int spurmode;
250 u16 ath_hal_spurChans[AR_EEPROM_MODAL_SPURS][2]; 251 u16 spurchans[AR_EEPROM_MODAL_SPURS][2];
251}; 252};
252 253
253enum ath9k_tx_queue { 254enum ath9k_tx_queue {
@@ -815,8 +816,8 @@ struct ath_hal {
815 u8 ah_decompMask[ATH9K_DECOMP_MASK_SIZE]; 816 u8 ah_decompMask[ATH9K_DECOMP_MASK_SIZE];
816 u32 ah_flags; 817 u32 ah_flags;
817 enum ath9k_opmode ah_opmode; 818 enum ath9k_opmode ah_opmode;
818 struct hal_ops_config ah_config; 819 struct ath9k_ops_config ah_config;
819 struct hal_capabilities ah_caps; 820 struct ath9k_hw_capabilities ah_caps;
820 int16_t ah_powerLimit; 821 int16_t ah_powerLimit;
821 u16 ah_maxPowerLevel; 822 u16 ah_maxPowerLevel;
822 u32 ah_tpScale; 823 u32 ah_tpScale;
@@ -878,7 +879,7 @@ struct chan_centers {
878}; 879};
879 880
880int ath_hal_getcapability(struct ath_hal *ah, 881int ath_hal_getcapability(struct ath_hal *ah,
881 enum hal_capability_type type, 882 enum ath9k_capability_type type,
882 u32 capability, 883 u32 capability,
883 u32 *result); 884 u32 *result);
884const struct ath9k_rate_table *ath9k_hw_getratetable(struct ath_hal *ah, 885const struct ath9k_rate_table *ath9k_hw_getratetable(struct ath_hal *ah,
@@ -947,11 +948,11 @@ void ath9k_hw_set11nmac2040(struct ath_hal *ah, enum ath9k_ht_macmode mode);
947bool ath9k_hw_phycounters(struct ath_hal *ah); 948bool ath9k_hw_phycounters(struct ath_hal *ah);
948bool ath9k_hw_keyreset(struct ath_hal *ah, u16 entry); 949bool ath9k_hw_keyreset(struct ath_hal *ah, u16 entry);
949bool ath9k_hw_getcapability(struct ath_hal *ah, 950bool ath9k_hw_getcapability(struct ath_hal *ah,
950 enum hal_capability_type type, 951 enum ath9k_capability_type type,
951 u32 capability, 952 u32 capability,
952 u32 *result); 953 u32 *result);
953bool ath9k_hw_setcapability(struct ath_hal *ah, 954bool ath9k_hw_setcapability(struct ath_hal *ah,
954 enum hal_capability_type type, 955 enum ath9k_capability_type type,
955 u32 capability, 956 u32 capability,
956 u32 setting, 957 u32 setting,
957 int *status); 958 int *status);