diff options
author | Ben Cahill <ben.m.cahill@intel.com> | 2007-11-28 22:09:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:05:19 -0500 |
commit | abceddb40728397fcfd0b295d7530920a606ab88 (patch) | |
tree | 0e5eb6083eca0c13f067d43330d03b3f2961c505 | |
parent | bc47279f558e7e9ea70dad1d484d2816ec239bb0 (diff) |
iwlwifi: Document 4965 rate_n_flags bits
Document 4965 rate_n_flags bits
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965-commands.h | 98 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.h | 30 |
2 files changed, 92 insertions, 36 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-commands.h b/drivers/net/wireless/iwlwifi/iwl-4965-commands.h index 2703c52750ba..00d4ab7c7ace 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965-commands.h | |||
@@ -141,7 +141,8 @@ enum { | |||
141 | 141 | ||
142 | /****************************************************************************** | 142 | /****************************************************************************** |
143 | * (0) | 143 | * (0) |
144 | * Header | 144 | * Commonly used structures and definitions: |
145 | * Command header, rate_n_flags | ||
145 | * | 146 | * |
146 | *****************************************************************************/ | 147 | *****************************************************************************/ |
147 | 148 | ||
@@ -167,6 +168,89 @@ struct iwl4965_cmd_header { | |||
167 | u8 data[0]; | 168 | u8 data[0]; |
168 | } __attribute__ ((packed)); | 169 | } __attribute__ ((packed)); |
169 | 170 | ||
171 | /** | ||
172 | * 4965 rate_n_flags bit fields | ||
173 | * | ||
174 | * rate_n_flags format is used in following 4965 commands: | ||
175 | * REPLY_4965_RX (response only) | ||
176 | * REPLY_TX (both command and response) | ||
177 | * REPLY_TX_LINK_QUALITY_CMD | ||
178 | * | ||
179 | * High-throughput (HT) rate format for bits 7:0 (bit 8 must be "1"): | ||
180 | * 2-0: 0) 6 Mbps | ||
181 | * 1) 12 Mbps | ||
182 | * 2) 18 Mbps | ||
183 | * 3) 24 Mbps | ||
184 | * 4) 36 Mbps | ||
185 | * 5) 48 Mbps | ||
186 | * 6) 54 Mbps | ||
187 | * 7) 60 Mbps | ||
188 | * | ||
189 | * 3: 0) Single stream (SISO) | ||
190 | * 1) Dual stream (MIMO) | ||
191 | * | ||
192 | * 5: Value of 0x20 in bits 7:0 indicates 6 Mbps FAT duplicate data | ||
193 | * | ||
194 | * Legacy OFDM rate format for bits 7:0 (bit 8 must be "0", bit 9 "0"): | ||
195 | * 3-0: 0xD) 6 Mbps | ||
196 | * 0xF) 9 Mbps | ||
197 | * 0x5) 12 Mbps | ||
198 | * 0x7) 18 Mbps | ||
199 | * 0x9) 24 Mbps | ||
200 | * 0xB) 36 Mbps | ||
201 | * 0x1) 48 Mbps | ||
202 | * 0x3) 54 Mbps | ||
203 | * | ||
204 | * Legacy CCK rate format for bits 7:0 (bit 8 must be "0", bit 9 "1"): | ||
205 | * 3-0: 10) 1 Mbps | ||
206 | * 20) 2 Mbps | ||
207 | * 55) 5.5 Mbps | ||
208 | * 110) 11 Mbps | ||
209 | */ | ||
210 | #define RATE_MCS_CODE_MSK 0x7 | ||
211 | #define RATE_MCS_MIMO_POS 3 | ||
212 | #define RATE_MCS_MIMO_MSK 0x8 | ||
213 | #define RATE_MCS_HT_DUP_POS 5 | ||
214 | #define RATE_MCS_HT_DUP_MSK 0x20 | ||
215 | |||
216 | /* (1) HT format, (0) legacy format in bits 7:0 */ | ||
217 | #define RATE_MCS_FLAGS_POS 8 | ||
218 | #define RATE_MCS_HT_POS 8 | ||
219 | #define RATE_MCS_HT_MSK 0x100 | ||
220 | |||
221 | /* (1) CCK, (0) OFDM. HT (bit 8) must be "0" for this bit to be valid */ | ||
222 | #define RATE_MCS_CCK_POS 9 | ||
223 | #define RATE_MCS_CCK_MSK 0x200 | ||
224 | |||
225 | /* (1) Use Green Field preamble */ | ||
226 | #define RATE_MCS_GF_POS 10 | ||
227 | #define RATE_MCS_GF_MSK 0x400 | ||
228 | |||
229 | /* (1) Use 40Mhz FAT channel width, (0) use 20 MHz legacy channel width */ | ||
230 | #define RATE_MCS_FAT_POS 11 | ||
231 | #define RATE_MCS_FAT_MSK 0x800 | ||
232 | |||
233 | /* (1) Duplicate data on both 20MHz channels. FAT (bit 11) must be set. */ | ||
234 | #define RATE_MCS_DUP_POS 12 | ||
235 | #define RATE_MCS_DUP_MSK 0x1000 | ||
236 | |||
237 | /* (1) Short guard interval (0.4 usec), (0) normal GI (0.8 usec) */ | ||
238 | #define RATE_MCS_SGI_POS 13 | ||
239 | #define RATE_MCS_SGI_MSK 0x2000 | ||
240 | |||
241 | /** | ||
242 | * rate_n_flags Tx antenna masks (4965 has 2 transmitters): | ||
243 | * bit14:15 01 B inactive, A active | ||
244 | * 10 B active, A inactive | ||
245 | * 11 Both active | ||
246 | */ | ||
247 | #define RATE_MCS_ANT_A_POS 14 | ||
248 | #define RATE_MCS_ANT_B_POS 15 | ||
249 | #define RATE_MCS_ANT_A_MSK 0x4000 | ||
250 | #define RATE_MCS_ANT_B_MSK 0x8000 | ||
251 | #define RATE_MCS_ANT_AB_MSK 0xc000 | ||
252 | |||
253 | |||
170 | /****************************************************************************** | 254 | /****************************************************************************** |
171 | * (0a) | 255 | * (0a) |
172 | * Alive and Error Commands & Responses: | 256 | * Alive and Error Commands & Responses: |
@@ -452,18 +536,6 @@ struct iwl4965_qosparam_cmd { | |||
452 | #define STA_MODIFY_DELBA_TID_MSK 0x10 | 536 | #define STA_MODIFY_DELBA_TID_MSK 0x10 |
453 | #define BUILD_RAxTID(sta_id, tid) (((sta_id) << 4) + (tid)) | 537 | #define BUILD_RAxTID(sta_id, tid) (((sta_id) << 4) + (tid)) |
454 | 538 | ||
455 | /* | ||
456 | * Antenna masks: | ||
457 | * bit14:15 01 B inactive, A active | ||
458 | * 10 B active, A inactive | ||
459 | * 11 Both active | ||
460 | */ | ||
461 | #define RATE_MCS_ANT_A_POS 14 | ||
462 | #define RATE_MCS_ANT_B_POS 15 | ||
463 | #define RATE_MCS_ANT_A_MSK 0x4000 | ||
464 | #define RATE_MCS_ANT_B_MSK 0x8000 | ||
465 | #define RATE_MCS_ANT_AB_MSK 0xc000 | ||
466 | |||
467 | struct iwl4965_keyinfo { | 539 | struct iwl4965_keyinfo { |
468 | __le16 key_flags; | 540 | __le16 key_flags; |
469 | u8 tkip_rx_tsc_byte2; /* TSC[2] for key mix ph1 detection */ | 541 | u8 tkip_rx_tsc_byte2; /* TSC[2] for key mix ph1 detection */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h index 30001482c485..af3497442a4b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965.h | |||
@@ -883,6 +883,11 @@ struct iwl4965_traffic_load { | |||
883 | }; | 883 | }; |
884 | 884 | ||
885 | #ifdef CONFIG_IWL4965_HT_AGG | 885 | #ifdef CONFIG_IWL4965_HT_AGG |
886 | /** | ||
887 | * struct iwl4965_agg_control | ||
888 | * @requested_ba: bit map of tids requesting aggregation/block-ack | ||
889 | * @granted_ba: bit map of tids granted aggregation/block-ack | ||
890 | */ | ||
886 | struct iwl4965_agg_control { | 891 | struct iwl4965_agg_control { |
887 | unsigned long next_retry; | 892 | unsigned long next_retry; |
888 | u32 wait_for_agg_status; | 893 | u32 wait_for_agg_status; |
@@ -1054,29 +1059,8 @@ struct iwl4965_chain_noise_data { | |||
1054 | u8 radio_write; | 1059 | u8 radio_write; |
1055 | }; | 1060 | }; |
1056 | 1061 | ||
1057 | /* IWL4965 */ | 1062 | #define EEPROM_SEM_TIMEOUT 10 /* milliseconds */ |
1058 | #define RATE_MCS_CODE_MSK 0x7 | 1063 | #define EEPROM_SEM_RETRY_LIMIT 1000 /* number of attempts (not time) */ |
1059 | #define RATE_MCS_MIMO_POS 3 | ||
1060 | #define RATE_MCS_MIMO_MSK 0x8 | ||
1061 | #define RATE_MCS_HT_DUP_POS 5 | ||
1062 | #define RATE_MCS_HT_DUP_MSK 0x20 | ||
1063 | #define RATE_MCS_FLAGS_POS 8 | ||
1064 | #define RATE_MCS_HT_POS 8 | ||
1065 | #define RATE_MCS_HT_MSK 0x100 | ||
1066 | #define RATE_MCS_CCK_POS 9 | ||
1067 | #define RATE_MCS_CCK_MSK 0x200 | ||
1068 | #define RATE_MCS_GF_POS 10 | ||
1069 | #define RATE_MCS_GF_MSK 0x400 | ||
1070 | |||
1071 | #define RATE_MCS_FAT_POS 11 | ||
1072 | #define RATE_MCS_FAT_MSK 0x800 | ||
1073 | #define RATE_MCS_DUP_POS 12 | ||
1074 | #define RATE_MCS_DUP_MSK 0x1000 | ||
1075 | #define RATE_MCS_SGI_POS 13 | ||
1076 | #define RATE_MCS_SGI_MSK 0x2000 | ||
1077 | |||
1078 | #define EEPROM_SEM_TIMEOUT 10 | ||
1079 | #define EEPROM_SEM_RETRY_LIMIT 1000 | ||
1080 | 1064 | ||
1081 | 1065 | ||
1082 | #ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT | 1066 | #ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT |