diff options
Diffstat (limited to 'drivers/net/wireless/ipw2200.h')
-rw-r--r-- | drivers/net/wireless/ipw2200.h | 574 |
1 files changed, 410 insertions, 164 deletions
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h index 0873b758f499..1c98db0652c9 100644 --- a/drivers/net/wireless/ipw2200.h +++ b/drivers/net/wireless/ipw2200.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /****************************************************************************** | 1 | /****************************************************************************** |
2 | 2 | ||
3 | Copyright(c) 2003 - 2004 Intel Corporation. All rights reserved. | 3 | Copyright(c) 2003 - 2005 Intel Corporation. All rights reserved. |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify it | 5 | This program is free software; you can redistribute it and/or modify it |
6 | under the terms of version 2 of the GNU General Public License as | 6 | under the terms of version 2 of the GNU General Public License as |
@@ -49,6 +49,7 @@ | |||
49 | #include <asm/io.h> | 49 | #include <asm/io.h> |
50 | 50 | ||
51 | #include <net/ieee80211.h> | 51 | #include <net/ieee80211.h> |
52 | #include <net/ieee80211_radiotap.h> | ||
52 | 53 | ||
53 | #define DRV_NAME "ipw2200" | 54 | #define DRV_NAME "ipw2200" |
54 | 55 | ||
@@ -160,6 +161,16 @@ enum connection_manager_assoc_states { | |||
160 | * TX Queue Flag Definitions | 161 | * TX Queue Flag Definitions |
161 | */ | 162 | */ |
162 | 163 | ||
164 | /* tx wep key definition */ | ||
165 | #define DCT_WEP_KEY_NOT_IMMIDIATE 0x00 | ||
166 | #define DCT_WEP_KEY_64Bit 0x40 | ||
167 | #define DCT_WEP_KEY_128Bit 0x80 | ||
168 | #define DCT_WEP_KEY_128bitIV 0xC0 | ||
169 | #define DCT_WEP_KEY_SIZE_MASK 0xC0 | ||
170 | |||
171 | #define DCT_WEP_KEY_INDEX_MASK 0x0F | ||
172 | #define DCT_WEP_INDEX_USE_IMMEDIATE 0x20 | ||
173 | |||
163 | /* abort attempt if mgmt frame is rx'd */ | 174 | /* abort attempt if mgmt frame is rx'd */ |
164 | #define DCT_FLAG_ABORT_MGMT 0x01 | 175 | #define DCT_FLAG_ABORT_MGMT 0x01 |
165 | 176 | ||
@@ -167,7 +178,8 @@ enum connection_manager_assoc_states { | |||
167 | #define DCT_FLAG_CTS_REQUIRED 0x02 | 178 | #define DCT_FLAG_CTS_REQUIRED 0x02 |
168 | 179 | ||
169 | /* use short preamble */ | 180 | /* use short preamble */ |
170 | #define DCT_FLAG_SHORT_PREMBL 0x04 | 181 | #define DCT_FLAG_LONG_PREAMBLE 0x00 |
182 | #define DCT_FLAG_SHORT_PREAMBLE 0x04 | ||
171 | 183 | ||
172 | /* RTS/CTS first */ | 184 | /* RTS/CTS first */ |
173 | #define DCT_FLAG_RTS_REQD 0x08 | 185 | #define DCT_FLAG_RTS_REQD 0x08 |
@@ -184,9 +196,23 @@ enum connection_manager_assoc_states { | |||
184 | /* ACK rx is expected to follow */ | 196 | /* ACK rx is expected to follow */ |
185 | #define DCT_FLAG_ACK_REQD 0x80 | 197 | #define DCT_FLAG_ACK_REQD 0x80 |
186 | 198 | ||
199 | /* TX flags extension */ | ||
187 | #define DCT_FLAG_EXT_MODE_CCK 0x01 | 200 | #define DCT_FLAG_EXT_MODE_CCK 0x01 |
188 | #define DCT_FLAG_EXT_MODE_OFDM 0x00 | 201 | #define DCT_FLAG_EXT_MODE_OFDM 0x00 |
189 | 202 | ||
203 | #define DCT_FLAG_EXT_SECURITY_WEP 0x00 | ||
204 | #define DCT_FLAG_EXT_SECURITY_NO DCT_FLAG_EXT_SECURITY_WEP | ||
205 | #define DCT_FLAG_EXT_SECURITY_CKIP 0x04 | ||
206 | #define DCT_FLAG_EXT_SECURITY_CCM 0x08 | ||
207 | #define DCT_FLAG_EXT_SECURITY_TKIP 0x0C | ||
208 | #define DCT_FLAG_EXT_SECURITY_MASK 0x0C | ||
209 | |||
210 | #define DCT_FLAG_EXT_QOS_ENABLED 0x10 | ||
211 | |||
212 | #define DCT_FLAG_EXT_HC_NO_SIFS_PIFS 0x00 | ||
213 | #define DCT_FLAG_EXT_HC_SIFS 0x20 | ||
214 | #define DCT_FLAG_EXT_HC_PIFS 0x40 | ||
215 | |||
190 | #define TX_RX_TYPE_MASK 0xFF | 216 | #define TX_RX_TYPE_MASK 0xFF |
191 | #define TX_FRAME_TYPE 0x00 | 217 | #define TX_FRAME_TYPE 0x00 |
192 | #define TX_HOST_COMMAND_TYPE 0x01 | 218 | #define TX_HOST_COMMAND_TYPE 0x01 |
@@ -232,6 +258,117 @@ enum connection_manager_assoc_states { | |||
232 | #define DCR_TYPE_SNIFFER 0x06 | 258 | #define DCR_TYPE_SNIFFER 0x06 |
233 | #define DCR_TYPE_MU_BSS DCR_TYPE_MU_ESS | 259 | #define DCR_TYPE_MU_BSS DCR_TYPE_MU_ESS |
234 | 260 | ||
261 | /* QoS definitions */ | ||
262 | |||
263 | #define CW_MIN_OFDM 15 | ||
264 | #define CW_MAX_OFDM 1023 | ||
265 | #define CW_MIN_CCK 31 | ||
266 | #define CW_MAX_CCK 1023 | ||
267 | |||
268 | #define QOS_TX0_CW_MIN_OFDM CW_MIN_OFDM | ||
269 | #define QOS_TX1_CW_MIN_OFDM CW_MIN_OFDM | ||
270 | #define QOS_TX2_CW_MIN_OFDM ( (CW_MIN_OFDM + 1) / 2 - 1 ) | ||
271 | #define QOS_TX3_CW_MIN_OFDM ( (CW_MIN_OFDM + 1) / 4 - 1 ) | ||
272 | |||
273 | #define QOS_TX0_CW_MIN_CCK CW_MIN_CCK | ||
274 | #define QOS_TX1_CW_MIN_CCK CW_MIN_CCK | ||
275 | #define QOS_TX2_CW_MIN_CCK ( (CW_MIN_CCK + 1) / 2 - 1 ) | ||
276 | #define QOS_TX3_CW_MIN_CCK ( (CW_MIN_CCK + 1) / 4 - 1 ) | ||
277 | |||
278 | #define QOS_TX0_CW_MAX_OFDM CW_MAX_OFDM | ||
279 | #define QOS_TX1_CW_MAX_OFDM CW_MAX_OFDM | ||
280 | #define QOS_TX2_CW_MAX_OFDM CW_MIN_OFDM | ||
281 | #define QOS_TX3_CW_MAX_OFDM ( (CW_MIN_OFDM + 1) / 2 - 1 ) | ||
282 | |||
283 | #define QOS_TX0_CW_MAX_CCK CW_MAX_CCK | ||
284 | #define QOS_TX1_CW_MAX_CCK CW_MAX_CCK | ||
285 | #define QOS_TX2_CW_MAX_CCK CW_MIN_CCK | ||
286 | #define QOS_TX3_CW_MAX_CCK ( (CW_MIN_CCK + 1) / 2 - 1 ) | ||
287 | |||
288 | #define QOS_TX0_AIFS (3 - QOS_AIFSN_MIN_VALUE) | ||
289 | #define QOS_TX1_AIFS (7 - QOS_AIFSN_MIN_VALUE) | ||
290 | #define QOS_TX2_AIFS (2 - QOS_AIFSN_MIN_VALUE) | ||
291 | #define QOS_TX3_AIFS (2 - QOS_AIFSN_MIN_VALUE) | ||
292 | |||
293 | #define QOS_TX0_ACM 0 | ||
294 | #define QOS_TX1_ACM 0 | ||
295 | #define QOS_TX2_ACM 0 | ||
296 | #define QOS_TX3_ACM 0 | ||
297 | |||
298 | #define QOS_TX0_TXOP_LIMIT_CCK 0 | ||
299 | #define QOS_TX1_TXOP_LIMIT_CCK 0 | ||
300 | #define QOS_TX2_TXOP_LIMIT_CCK 6016 | ||
301 | #define QOS_TX3_TXOP_LIMIT_CCK 3264 | ||
302 | |||
303 | #define QOS_TX0_TXOP_LIMIT_OFDM 0 | ||
304 | #define QOS_TX1_TXOP_LIMIT_OFDM 0 | ||
305 | #define QOS_TX2_TXOP_LIMIT_OFDM 3008 | ||
306 | #define QOS_TX3_TXOP_LIMIT_OFDM 1504 | ||
307 | |||
308 | #define DEF_TX0_CW_MIN_OFDM CW_MIN_OFDM | ||
309 | #define DEF_TX1_CW_MIN_OFDM CW_MIN_OFDM | ||
310 | #define DEF_TX2_CW_MIN_OFDM CW_MIN_OFDM | ||
311 | #define DEF_TX3_CW_MIN_OFDM CW_MIN_OFDM | ||
312 | |||
313 | #define DEF_TX0_CW_MIN_CCK CW_MIN_CCK | ||
314 | #define DEF_TX1_CW_MIN_CCK CW_MIN_CCK | ||
315 | #define DEF_TX2_CW_MIN_CCK CW_MIN_CCK | ||
316 | #define DEF_TX3_CW_MIN_CCK CW_MIN_CCK | ||
317 | |||
318 | #define DEF_TX0_CW_MAX_OFDM CW_MAX_OFDM | ||
319 | #define DEF_TX1_CW_MAX_OFDM CW_MAX_OFDM | ||
320 | #define DEF_TX2_CW_MAX_OFDM CW_MAX_OFDM | ||
321 | #define DEF_TX3_CW_MAX_OFDM CW_MAX_OFDM | ||
322 | |||
323 | #define DEF_TX0_CW_MAX_CCK CW_MAX_CCK | ||
324 | #define DEF_TX1_CW_MAX_CCK CW_MAX_CCK | ||
325 | #define DEF_TX2_CW_MAX_CCK CW_MAX_CCK | ||
326 | #define DEF_TX3_CW_MAX_CCK CW_MAX_CCK | ||
327 | |||
328 | #define DEF_TX0_AIFS 0 | ||
329 | #define DEF_TX1_AIFS 0 | ||
330 | #define DEF_TX2_AIFS 0 | ||
331 | #define DEF_TX3_AIFS 0 | ||
332 | |||
333 | #define DEF_TX0_ACM 0 | ||
334 | #define DEF_TX1_ACM 0 | ||
335 | #define DEF_TX2_ACM 0 | ||
336 | #define DEF_TX3_ACM 0 | ||
337 | |||
338 | #define DEF_TX0_TXOP_LIMIT_CCK 0 | ||
339 | #define DEF_TX1_TXOP_LIMIT_CCK 0 | ||
340 | #define DEF_TX2_TXOP_LIMIT_CCK 0 | ||
341 | #define DEF_TX3_TXOP_LIMIT_CCK 0 | ||
342 | |||
343 | #define DEF_TX0_TXOP_LIMIT_OFDM 0 | ||
344 | #define DEF_TX1_TXOP_LIMIT_OFDM 0 | ||
345 | #define DEF_TX2_TXOP_LIMIT_OFDM 0 | ||
346 | #define DEF_TX3_TXOP_LIMIT_OFDM 0 | ||
347 | |||
348 | #define QOS_QOS_SETS 3 | ||
349 | #define QOS_PARAM_SET_ACTIVE 0 | ||
350 | #define QOS_PARAM_SET_DEF_CCK 1 | ||
351 | #define QOS_PARAM_SET_DEF_OFDM 2 | ||
352 | |||
353 | #define CTRL_QOS_NO_ACK (0x0020) | ||
354 | |||
355 | #define IPW_TX_QUEUE_1 1 | ||
356 | #define IPW_TX_QUEUE_2 2 | ||
357 | #define IPW_TX_QUEUE_3 3 | ||
358 | #define IPW_TX_QUEUE_4 4 | ||
359 | |||
360 | /* QoS sturctures */ | ||
361 | struct ipw_qos_info { | ||
362 | int qos_enable; | ||
363 | struct ieee80211_qos_parameters *def_qos_parm_OFDM; | ||
364 | struct ieee80211_qos_parameters *def_qos_parm_CCK; | ||
365 | u32 burst_duration_CCK; | ||
366 | u32 burst_duration_OFDM; | ||
367 | u16 qos_no_ack_mask; | ||
368 | int burst_enable; | ||
369 | }; | ||
370 | |||
371 | /**************************************************************/ | ||
235 | /** | 372 | /** |
236 | * Generic queue structure | 373 | * Generic queue structure |
237 | * | 374 | * |
@@ -401,9 +538,9 @@ struct clx2_tx_queue { | |||
401 | #define RX_FREE_BUFFERS 32 | 538 | #define RX_FREE_BUFFERS 32 |
402 | #define RX_LOW_WATERMARK 8 | 539 | #define RX_LOW_WATERMARK 8 |
403 | 540 | ||
404 | #define SUP_RATE_11A_MAX_NUM_CHANNELS (8) | 541 | #define SUP_RATE_11A_MAX_NUM_CHANNELS 8 |
405 | #define SUP_RATE_11B_MAX_NUM_CHANNELS (4) | 542 | #define SUP_RATE_11B_MAX_NUM_CHANNELS 4 |
406 | #define SUP_RATE_11G_MAX_NUM_CHANNELS (12) | 543 | #define SUP_RATE_11G_MAX_NUM_CHANNELS 12 |
407 | 544 | ||
408 | // Used for passing to driver number of successes and failures per rate | 545 | // Used for passing to driver number of successes and failures per rate |
409 | struct rate_histogram { | 546 | struct rate_histogram { |
@@ -452,6 +589,9 @@ struct notif_channel_result { | |||
452 | u8 uReserved; | 589 | u8 uReserved; |
453 | } __attribute__ ((packed)); | 590 | } __attribute__ ((packed)); |
454 | 591 | ||
592 | #define SCAN_COMPLETED_STATUS_COMPLETE 1 | ||
593 | #define SCAN_COMPLETED_STATUS_ABORTED 2 | ||
594 | |||
455 | struct notif_scan_complete { | 595 | struct notif_scan_complete { |
456 | u8 scan_type; | 596 | u8 scan_type; |
457 | u8 num_channels; | 597 | u8 num_channels; |
@@ -562,8 +702,8 @@ struct ipw_rx_packet { | |||
562 | } __attribute__ ((packed)); | 702 | } __attribute__ ((packed)); |
563 | 703 | ||
564 | #define IPW_RX_NOTIFICATION_SIZE sizeof(struct ipw_rx_header) + 12 | 704 | #define IPW_RX_NOTIFICATION_SIZE sizeof(struct ipw_rx_header) + 12 |
565 | #define IPW_RX_FRAME_SIZE sizeof(struct ipw_rx_header) + \ | 705 | #define IPW_RX_FRAME_SIZE (unsigned int)(sizeof(struct ipw_rx_header) + \ |
566 | sizeof(struct ipw_rx_frame) | 706 | sizeof(struct ipw_rx_frame)) |
567 | 707 | ||
568 | struct ipw_rx_mem_buffer { | 708 | struct ipw_rx_mem_buffer { |
569 | dma_addr_t dma_addr; | 709 | dma_addr_t dma_addr; |
@@ -656,6 +796,19 @@ struct ipw_multicast_addr { | |||
656 | u8 mac4[6]; | 796 | u8 mac4[6]; |
657 | } __attribute__ ((packed)); | 797 | } __attribute__ ((packed)); |
658 | 798 | ||
799 | #define DCW_WEP_KEY_INDEX_MASK 0x03 /* bits [0:1] */ | ||
800 | #define DCW_WEP_KEY_SEC_TYPE_MASK 0x30 /* bits [4:5] */ | ||
801 | |||
802 | #define DCW_WEP_KEY_SEC_TYPE_WEP 0x00 | ||
803 | #define DCW_WEP_KEY_SEC_TYPE_CCM 0x20 | ||
804 | #define DCW_WEP_KEY_SEC_TYPE_TKIP 0x30 | ||
805 | |||
806 | #define DCW_WEP_KEY_INVALID_SIZE 0x00 /* 0 = Invalid key */ | ||
807 | #define DCW_WEP_KEY64Bit_SIZE 0x05 /* 64-bit encryption */ | ||
808 | #define DCW_WEP_KEY128Bit_SIZE 0x0D /* 128-bit encryption */ | ||
809 | #define DCW_CCM_KEY128Bit_SIZE 0x10 /* 128-bit key */ | ||
810 | //#define DCW_WEP_KEY128BitIV_SIZE 0x10 /* 128-bit key and 128-bit IV */ | ||
811 | |||
659 | struct ipw_wep_key { | 812 | struct ipw_wep_key { |
660 | u8 cmd_id; | 813 | u8 cmd_id; |
661 | u8 seq_num; | 814 | u8 seq_num; |
@@ -817,14 +970,6 @@ struct ipw_tx_power { | |||
817 | struct ipw_channel_tx_power channels_tx_power[MAX_A_CHANNELS]; | 970 | struct ipw_channel_tx_power channels_tx_power[MAX_A_CHANNELS]; |
818 | } __attribute__ ((packed)); | 971 | } __attribute__ ((packed)); |
819 | 972 | ||
820 | struct ipw_qos_parameters { | ||
821 | u16 cw_min[4]; | ||
822 | u16 cw_max[4]; | ||
823 | u8 aifs[4]; | ||
824 | u8 flag[4]; | ||
825 | u16 tx_op_limit[4]; | ||
826 | } __attribute__ ((packed)); | ||
827 | |||
828 | struct ipw_rsn_capabilities { | 973 | struct ipw_rsn_capabilities { |
829 | u8 id; | 974 | u8 id; |
830 | u8 length; | 975 | u8 length; |
@@ -887,6 +1032,10 @@ struct ipw_cmd { | |||
887 | #define STATUS_SCAN_PENDING (1<<20) | 1032 | #define STATUS_SCAN_PENDING (1<<20) |
888 | #define STATUS_SCANNING (1<<21) | 1033 | #define STATUS_SCANNING (1<<21) |
889 | #define STATUS_SCAN_ABORTING (1<<22) | 1034 | #define STATUS_SCAN_ABORTING (1<<22) |
1035 | #define STATUS_SCAN_FORCED (1<<23) | ||
1036 | |||
1037 | #define STATUS_LED_LINK_ON (1<<24) | ||
1038 | #define STATUS_LED_ACT_ON (1<<25) | ||
890 | 1039 | ||
891 | #define STATUS_INDIRECT_BYTE (1<<28) /* sysfs entry configured for access */ | 1040 | #define STATUS_INDIRECT_BYTE (1<<28) /* sysfs entry configured for access */ |
892 | #define STATUS_INDIRECT_DWORD (1<<29) /* sysfs entry configured for access */ | 1041 | #define STATUS_INDIRECT_DWORD (1<<29) /* sysfs entry configured for access */ |
@@ -898,11 +1047,15 @@ struct ipw_cmd { | |||
898 | #define CFG_STATIC_ESSID (1<<1) /* Restrict assoc. to single SSID */ | 1047 | #define CFG_STATIC_ESSID (1<<1) /* Restrict assoc. to single SSID */ |
899 | #define CFG_STATIC_BSSID (1<<2) /* Restrict assoc. to single BSSID */ | 1048 | #define CFG_STATIC_BSSID (1<<2) /* Restrict assoc. to single BSSID */ |
900 | #define CFG_CUSTOM_MAC (1<<3) | 1049 | #define CFG_CUSTOM_MAC (1<<3) |
901 | #define CFG_PREAMBLE (1<<4) | 1050 | #define CFG_PREAMBLE_LONG (1<<4) |
902 | #define CFG_ADHOC_PERSIST (1<<5) | 1051 | #define CFG_ADHOC_PERSIST (1<<5) |
903 | #define CFG_ASSOCIATE (1<<6) | 1052 | #define CFG_ASSOCIATE (1<<6) |
904 | #define CFG_FIXED_RATE (1<<7) | 1053 | #define CFG_FIXED_RATE (1<<7) |
905 | #define CFG_ADHOC_CREATE (1<<8) | 1054 | #define CFG_ADHOC_CREATE (1<<8) |
1055 | #define CFG_NO_LED (1<<9) | ||
1056 | #define CFG_BACKGROUND_SCAN (1<<10) | ||
1057 | #define CFG_SPEED_SCAN (1<<11) | ||
1058 | #define CFG_NET_STATS (1<<12) | ||
906 | 1059 | ||
907 | #define CAP_SHARED_KEY (1<<0) /* Off = OPEN */ | 1060 | #define CAP_SHARED_KEY (1<<0) /* Off = OPEN */ |
908 | #define CAP_PRIVACY_ON (1<<1) /* Off = No privacy */ | 1061 | #define CAP_PRIVACY_ON (1<<1) /* Off = No privacy */ |
@@ -924,13 +1077,50 @@ struct average { | |||
924 | s32 sum; | 1077 | s32 sum; |
925 | }; | 1078 | }; |
926 | 1079 | ||
1080 | #define MAX_SPEED_SCAN 100 | ||
1081 | #define IPW_IBSS_MAC_HASH_SIZE 31 | ||
1082 | |||
1083 | struct ipw_ibss_seq { | ||
1084 | u8 mac[ETH_ALEN]; | ||
1085 | u16 seq_num; | ||
1086 | u16 frag_num; | ||
1087 | unsigned long packet_time; | ||
1088 | struct list_head list; | ||
1089 | }; | ||
1090 | |||
1091 | struct ipw_error_elem { | ||
1092 | u32 desc; | ||
1093 | u32 time; | ||
1094 | u32 blink1; | ||
1095 | u32 blink2; | ||
1096 | u32 link1; | ||
1097 | u32 link2; | ||
1098 | u32 data; | ||
1099 | }; | ||
1100 | |||
1101 | struct ipw_event { | ||
1102 | u32 event; | ||
1103 | u32 time; | ||
1104 | u32 data; | ||
1105 | } __attribute__ ((packed)); | ||
1106 | |||
1107 | struct ipw_fw_error { | ||
1108 | unsigned long jiffies; | ||
1109 | u32 status; | ||
1110 | u32 config; | ||
1111 | u32 elem_len; | ||
1112 | u32 log_len; | ||
1113 | struct ipw_error_elem *elem; | ||
1114 | struct ipw_event *log; | ||
1115 | u8 payload[0]; | ||
1116 | } __attribute__ ((packed)); | ||
1117 | |||
927 | struct ipw_priv { | 1118 | struct ipw_priv { |
928 | /* ieee device used by generic ieee processing code */ | 1119 | /* ieee device used by generic ieee processing code */ |
929 | struct ieee80211_device *ieee; | 1120 | struct ieee80211_device *ieee; |
930 | struct ieee80211_security sec; | ||
931 | 1121 | ||
932 | /* spinlock */ | ||
933 | spinlock_t lock; | 1122 | spinlock_t lock; |
1123 | struct semaphore sem; | ||
934 | 1124 | ||
935 | /* basic pci-network driver stuff */ | 1125 | /* basic pci-network driver stuff */ |
936 | struct pci_dev *pci_dev; | 1126 | struct pci_dev *pci_dev; |
@@ -965,7 +1155,7 @@ struct ipw_priv { | |||
965 | int rx_bufs_min; /**< minimum number of bufs in Rx queue */ | 1155 | int rx_bufs_min; /**< minimum number of bufs in Rx queue */ |
966 | int rx_pend_max; /**< maximum pending buffers for one IRQ */ | 1156 | int rx_pend_max; /**< maximum pending buffers for one IRQ */ |
967 | u32 hcmd_seq; /**< sequence number for hcmd */ | 1157 | u32 hcmd_seq; /**< sequence number for hcmd */ |
968 | u32 missed_beacon_threshold; | 1158 | u32 disassociate_threshold; |
969 | u32 roaming_threshold; | 1159 | u32 roaming_threshold; |
970 | 1160 | ||
971 | struct ipw_associate assoc_request; | 1161 | struct ipw_associate assoc_request; |
@@ -1006,6 +1196,8 @@ struct ipw_priv { | |||
1006 | u8 mac_addr[ETH_ALEN]; | 1196 | u8 mac_addr[ETH_ALEN]; |
1007 | u8 num_stations; | 1197 | u8 num_stations; |
1008 | u8 stations[MAX_STATIONS][ETH_ALEN]; | 1198 | u8 stations[MAX_STATIONS][ETH_ALEN]; |
1199 | u8 short_retry_limit; | ||
1200 | u8 long_retry_limit; | ||
1009 | 1201 | ||
1010 | u32 notif_missed_beacons; | 1202 | u32 notif_missed_beacons; |
1011 | 1203 | ||
@@ -1023,17 +1215,29 @@ struct ipw_priv { | |||
1023 | u32 tx_packets; | 1215 | u32 tx_packets; |
1024 | u32 quality; | 1216 | u32 quality; |
1025 | 1217 | ||
1218 | u8 speed_scan[MAX_SPEED_SCAN]; | ||
1219 | u8 speed_scan_pos; | ||
1220 | |||
1221 | u16 last_seq_num; | ||
1222 | u16 last_frag_num; | ||
1223 | unsigned long last_packet_time; | ||
1224 | struct list_head ibss_mac_hash[IPW_IBSS_MAC_HASH_SIZE]; | ||
1225 | |||
1026 | /* eeprom */ | 1226 | /* eeprom */ |
1027 | u8 eeprom[0x100]; /* 256 bytes of eeprom */ | 1227 | u8 eeprom[0x100]; /* 256 bytes of eeprom */ |
1228 | u8 country[4]; | ||
1028 | int eeprom_delay; | 1229 | int eeprom_delay; |
1029 | 1230 | ||
1030 | struct iw_statistics wstats; | 1231 | struct iw_statistics wstats; |
1031 | 1232 | ||
1233 | struct iw_public_data wireless_data; | ||
1234 | |||
1032 | struct workqueue_struct *workqueue; | 1235 | struct workqueue_struct *workqueue; |
1033 | 1236 | ||
1034 | struct work_struct adhoc_check; | 1237 | struct work_struct adhoc_check; |
1035 | struct work_struct associate; | 1238 | struct work_struct associate; |
1036 | struct work_struct disassociate; | 1239 | struct work_struct disassociate; |
1240 | struct work_struct system_config; | ||
1037 | struct work_struct rx_replenish; | 1241 | struct work_struct rx_replenish; |
1038 | struct work_struct request_scan; | 1242 | struct work_struct request_scan; |
1039 | struct work_struct adapter_restart; | 1243 | struct work_struct adapter_restart; |
@@ -1044,25 +1248,51 @@ struct ipw_priv { | |||
1044 | struct work_struct abort_scan; | 1248 | struct work_struct abort_scan; |
1045 | struct work_struct roam; | 1249 | struct work_struct roam; |
1046 | struct work_struct scan_check; | 1250 | struct work_struct scan_check; |
1251 | struct work_struct link_up; | ||
1252 | struct work_struct link_down; | ||
1047 | 1253 | ||
1048 | struct tasklet_struct irq_tasklet; | 1254 | struct tasklet_struct irq_tasklet; |
1049 | 1255 | ||
1256 | /* LED related variables and work_struct */ | ||
1257 | u8 nic_type; | ||
1258 | u32 led_activity_on; | ||
1259 | u32 led_activity_off; | ||
1260 | u32 led_association_on; | ||
1261 | u32 led_association_off; | ||
1262 | u32 led_ofdm_on; | ||
1263 | u32 led_ofdm_off; | ||
1264 | |||
1265 | struct work_struct led_link_on; | ||
1266 | struct work_struct led_link_off; | ||
1267 | struct work_struct led_act_off; | ||
1268 | struct work_struct merge_networks; | ||
1269 | |||
1270 | struct ipw_cmd_log *cmdlog; | ||
1271 | int cmdlog_len; | ||
1272 | int cmdlog_pos; | ||
1273 | |||
1050 | #define IPW_2200BG 1 | 1274 | #define IPW_2200BG 1 |
1051 | #define IPW_2915ABG 2 | 1275 | #define IPW_2915ABG 2 |
1052 | u8 adapter; | 1276 | u8 adapter; |
1053 | 1277 | ||
1054 | #define IPW_DEFAULT_TX_POWER 0x14 | 1278 | s8 tx_power; |
1055 | u8 tx_power; | ||
1056 | 1279 | ||
1057 | #ifdef CONFIG_PM | 1280 | #ifdef CONFIG_PM |
1058 | u32 pm_state[16]; | 1281 | u32 pm_state[16]; |
1059 | #endif | 1282 | #endif |
1060 | 1283 | ||
1284 | struct ipw_fw_error *error; | ||
1285 | |||
1061 | /* network state */ | 1286 | /* network state */ |
1062 | 1287 | ||
1063 | /* Used to pass the current INTA value from ISR to Tasklet */ | 1288 | /* Used to pass the current INTA value from ISR to Tasklet */ |
1064 | u32 isr_inta; | 1289 | u32 isr_inta; |
1065 | 1290 | ||
1291 | /* QoS */ | ||
1292 | struct ipw_qos_info qos_data; | ||
1293 | struct work_struct qos_activate; | ||
1294 | /*********************************/ | ||
1295 | |||
1066 | /* debugging info */ | 1296 | /* debugging info */ |
1067 | u32 indirect_dword; | 1297 | u32 indirect_dword; |
1068 | u32 direct_dword; | 1298 | u32 direct_dword; |
@@ -1124,6 +1354,8 @@ do { if (ipw_debug_level & (level)) \ | |||
1124 | #define IPW_DL_RF_KILL (1<<17) | 1354 | #define IPW_DL_RF_KILL (1<<17) |
1125 | #define IPW_DL_FW_ERRORS (1<<18) | 1355 | #define IPW_DL_FW_ERRORS (1<<18) |
1126 | 1356 | ||
1357 | #define IPW_DL_LED (1<<19) | ||
1358 | |||
1127 | #define IPW_DL_ORD (1<<20) | 1359 | #define IPW_DL_ORD (1<<20) |
1128 | 1360 | ||
1129 | #define IPW_DL_FRAG (1<<21) | 1361 | #define IPW_DL_FRAG (1<<21) |
@@ -1136,6 +1368,8 @@ do { if (ipw_debug_level & (level)) \ | |||
1136 | #define IPW_DL_TRACE (1<<28) | 1368 | #define IPW_DL_TRACE (1<<28) |
1137 | 1369 | ||
1138 | #define IPW_DL_STATS (1<<29) | 1370 | #define IPW_DL_STATS (1<<29) |
1371 | #define IPW_DL_MERGE (1<<30) | ||
1372 | #define IPW_DL_QOS (1<<31) | ||
1139 | 1373 | ||
1140 | #define IPW_ERROR(f, a...) printk(KERN_ERR DRV_NAME ": " f, ## a) | 1374 | #define IPW_ERROR(f, a...) printk(KERN_ERR DRV_NAME ": " f, ## a) |
1141 | #define IPW_WARNING(f, a...) printk(KERN_WARNING DRV_NAME ": " f, ## a) | 1375 | #define IPW_WARNING(f, a...) printk(KERN_WARNING DRV_NAME ": " f, ## a) |
@@ -1149,6 +1383,7 @@ do { if (ipw_debug_level & (level)) \ | |||
1149 | #define IPW_DEBUG_TX(f, a...) IPW_DEBUG(IPW_DL_TX, f, ## a) | 1383 | #define IPW_DEBUG_TX(f, a...) IPW_DEBUG(IPW_DL_TX, f, ## a) |
1150 | #define IPW_DEBUG_ISR(f, a...) IPW_DEBUG(IPW_DL_ISR, f, ## a) | 1384 | #define IPW_DEBUG_ISR(f, a...) IPW_DEBUG(IPW_DL_ISR, f, ## a) |
1151 | #define IPW_DEBUG_MANAGEMENT(f, a...) IPW_DEBUG(IPW_DL_MANAGE, f, ## a) | 1385 | #define IPW_DEBUG_MANAGEMENT(f, a...) IPW_DEBUG(IPW_DL_MANAGE, f, ## a) |
1386 | #define IPW_DEBUG_LED(f, a...) IPW_DEBUG(IPW_DL_LED, f, ## a) | ||
1152 | #define IPW_DEBUG_WEP(f, a...) IPW_DEBUG(IPW_DL_WEP, f, ## a) | 1387 | #define IPW_DEBUG_WEP(f, a...) IPW_DEBUG(IPW_DL_WEP, f, ## a) |
1153 | #define IPW_DEBUG_HC(f, a...) IPW_DEBUG(IPW_DL_HOST_COMMAND, f, ## a) | 1388 | #define IPW_DEBUG_HC(f, a...) IPW_DEBUG(IPW_DL_HOST_COMMAND, f, ## a) |
1154 | #define IPW_DEBUG_FRAG(f, a...) IPW_DEBUG(IPW_DL_FRAG, f, ## a) | 1389 | #define IPW_DEBUG_FRAG(f, a...) IPW_DEBUG(IPW_DL_FRAG, f, ## a) |
@@ -1162,6 +1397,8 @@ do { if (ipw_debug_level & (level)) \ | |||
1162 | #define IPW_DEBUG_STATE(f, a...) IPW_DEBUG(IPW_DL_STATE | IPW_DL_ASSOC | IPW_DL_INFO, f, ## a) | 1397 | #define IPW_DEBUG_STATE(f, a...) IPW_DEBUG(IPW_DL_STATE | IPW_DL_ASSOC | IPW_DL_INFO, f, ## a) |
1163 | #define IPW_DEBUG_ASSOC(f, a...) IPW_DEBUG(IPW_DL_ASSOC | IPW_DL_INFO, f, ## a) | 1398 | #define IPW_DEBUG_ASSOC(f, a...) IPW_DEBUG(IPW_DL_ASSOC | IPW_DL_INFO, f, ## a) |
1164 | #define IPW_DEBUG_STATS(f, a...) IPW_DEBUG(IPW_DL_STATS, f, ## a) | 1399 | #define IPW_DEBUG_STATS(f, a...) IPW_DEBUG(IPW_DL_STATS, f, ## a) |
1400 | #define IPW_DEBUG_MERGE(f, a...) IPW_DEBUG(IPW_DL_MERGE, f, ## a) | ||
1401 | #define IPW_DEBUG_QOS(f, a...) IPW_DEBUG(IPW_DL_QOS, f, ## a) | ||
1165 | 1402 | ||
1166 | #include <linux/ctype.h> | 1403 | #include <linux/ctype.h> |
1167 | 1404 | ||
@@ -1176,59 +1413,65 @@ do { if (ipw_debug_level & (level)) \ | |||
1176 | #define DINO_RXFIFO_DATA 0x01 | 1413 | #define DINO_RXFIFO_DATA 0x01 |
1177 | #define DINO_CONTROL_REG 0x00200000 | 1414 | #define DINO_CONTROL_REG 0x00200000 |
1178 | 1415 | ||
1179 | #define CX2_INTA_RW 0x00000008 | 1416 | #define IPW_INTA_RW 0x00000008 |
1180 | #define CX2_INTA_MASK_R 0x0000000C | 1417 | #define IPW_INTA_MASK_R 0x0000000C |
1181 | #define CX2_INDIRECT_ADDR 0x00000010 | 1418 | #define IPW_INDIRECT_ADDR 0x00000010 |
1182 | #define CX2_INDIRECT_DATA 0x00000014 | 1419 | #define IPW_INDIRECT_DATA 0x00000014 |
1183 | #define CX2_AUTOINC_ADDR 0x00000018 | 1420 | #define IPW_AUTOINC_ADDR 0x00000018 |
1184 | #define CX2_AUTOINC_DATA 0x0000001C | 1421 | #define IPW_AUTOINC_DATA 0x0000001C |
1185 | #define CX2_RESET_REG 0x00000020 | 1422 | #define IPW_RESET_REG 0x00000020 |
1186 | #define CX2_GP_CNTRL_RW 0x00000024 | 1423 | #define IPW_GP_CNTRL_RW 0x00000024 |
1187 | 1424 | ||
1188 | #define CX2_READ_INT_REGISTER 0xFF4 | 1425 | #define IPW_READ_INT_REGISTER 0xFF4 |
1189 | 1426 | ||
1190 | #define CX2_GP_CNTRL_BIT_INIT_DONE 0x00000004 | 1427 | #define IPW_GP_CNTRL_BIT_INIT_DONE 0x00000004 |
1191 | 1428 | ||
1192 | #define CX2_REGISTER_DOMAIN1_END 0x00001000 | 1429 | #define IPW_REGISTER_DOMAIN1_END 0x00001000 |
1193 | #define CX2_SRAM_READ_INT_REGISTER 0x00000ff4 | 1430 | #define IPW_SRAM_READ_INT_REGISTER 0x00000ff4 |
1194 | 1431 | ||
1195 | #define CX2_SHARED_LOWER_BOUND 0x00000200 | 1432 | #define IPW_SHARED_LOWER_BOUND 0x00000200 |
1196 | #define CX2_INTERRUPT_AREA_LOWER_BOUND 0x00000f80 | 1433 | #define IPW_INTERRUPT_AREA_LOWER_BOUND 0x00000f80 |
1197 | 1434 | ||
1198 | #define CX2_NIC_SRAM_LOWER_BOUND 0x00000000 | 1435 | #define IPW_NIC_SRAM_LOWER_BOUND 0x00000000 |
1199 | #define CX2_NIC_SRAM_UPPER_BOUND 0x00030000 | 1436 | #define IPW_NIC_SRAM_UPPER_BOUND 0x00030000 |
1200 | 1437 | ||
1201 | #define CX2_BIT_INT_HOST_SRAM_READ_INT_REGISTER (1 << 29) | 1438 | #define IPW_BIT_INT_HOST_SRAM_READ_INT_REGISTER (1 << 29) |
1202 | #define CX2_GP_CNTRL_BIT_CLOCK_READY 0x00000001 | 1439 | #define IPW_GP_CNTRL_BIT_CLOCK_READY 0x00000001 |
1203 | #define CX2_GP_CNTRL_BIT_HOST_ALLOWS_STANDBY 0x00000002 | 1440 | #define IPW_GP_CNTRL_BIT_HOST_ALLOWS_STANDBY 0x00000002 |
1204 | 1441 | ||
1205 | /* | 1442 | /* |
1206 | * RESET Register Bit Indexes | 1443 | * RESET Register Bit Indexes |
1207 | */ | 1444 | */ |
1208 | #define CBD_RESET_REG_PRINCETON_RESET 0x00000001 /* Bit 0 (LSB) */ | 1445 | #define CBD_RESET_REG_PRINCETON_RESET (1<<0) |
1209 | #define CX2_RESET_REG_SW_RESET 0x00000080 /* Bit 7 */ | 1446 | #define IPW_START_STANDBY (1<<2) |
1210 | #define CX2_RESET_REG_MASTER_DISABLED 0x00000100 /* Bit 8 */ | 1447 | #define IPW_ACTIVITY_LED (1<<4) |
1211 | #define CX2_RESET_REG_STOP_MASTER 0x00000200 /* Bit 9 */ | 1448 | #define IPW_ASSOCIATED_LED (1<<5) |
1212 | #define CX2_ARC_KESHET_CONFIG 0x08000000 /* Bit 27 */ | 1449 | #define IPW_OFDM_LED (1<<6) |
1213 | #define CX2_START_STANDBY 0x00000004 /* Bit 2 */ | 1450 | #define IPW_RESET_REG_SW_RESET (1<<7) |
1214 | 1451 | #define IPW_RESET_REG_MASTER_DISABLED (1<<8) | |
1215 | #define CX2_CSR_CIS_UPPER_BOUND 0x00000200 | 1452 | #define IPW_RESET_REG_STOP_MASTER (1<<9) |
1216 | #define CX2_DOMAIN_0_END 0x1000 | 1453 | #define IPW_GATE_ODMA (1<<25) |
1454 | #define IPW_GATE_IDMA (1<<26) | ||
1455 | #define IPW_ARC_KESHET_CONFIG (1<<27) | ||
1456 | #define IPW_GATE_ADMA (1<<29) | ||
1457 | |||
1458 | #define IPW_CSR_CIS_UPPER_BOUND 0x00000200 | ||
1459 | #define IPW_DOMAIN_0_END 0x1000 | ||
1217 | #define CLX_MEM_BAR_SIZE 0x1000 | 1460 | #define CLX_MEM_BAR_SIZE 0x1000 |
1218 | 1461 | ||
1219 | #define CX2_BASEBAND_CONTROL_STATUS 0X00200000 | 1462 | #define IPW_BASEBAND_CONTROL_STATUS 0X00200000 |
1220 | #define CX2_BASEBAND_TX_FIFO_WRITE 0X00200004 | 1463 | #define IPW_BASEBAND_TX_FIFO_WRITE 0X00200004 |
1221 | #define CX2_BASEBAND_RX_FIFO_READ 0X00200004 | 1464 | #define IPW_BASEBAND_RX_FIFO_READ 0X00200004 |
1222 | #define CX2_BASEBAND_CONTROL_STORE 0X00200010 | 1465 | #define IPW_BASEBAND_CONTROL_STORE 0X00200010 |
1223 | 1466 | ||
1224 | #define CX2_INTERNAL_CMD_EVENT 0X00300004 | 1467 | #define IPW_INTERNAL_CMD_EVENT 0X00300004 |
1225 | #define CX2_BASEBAND_POWER_DOWN 0x00000001 | 1468 | #define IPW_BASEBAND_POWER_DOWN 0x00000001 |
1226 | 1469 | ||
1227 | #define CX2_MEM_HALT_AND_RESET 0x003000e0 | 1470 | #define IPW_MEM_HALT_AND_RESET 0x003000e0 |
1228 | 1471 | ||
1229 | /* defgroup bits_halt_reset MEM_HALT_AND_RESET register bits */ | 1472 | /* defgroup bits_halt_reset MEM_HALT_AND_RESET register bits */ |
1230 | #define CX2_BIT_HALT_RESET_ON 0x80000000 | 1473 | #define IPW_BIT_HALT_RESET_ON 0x80000000 |
1231 | #define CX2_BIT_HALT_RESET_OFF 0x00000000 | 1474 | #define IPW_BIT_HALT_RESET_OFF 0x00000000 |
1232 | 1475 | ||
1233 | #define CB_LAST_VALID 0x20000000 | 1476 | #define CB_LAST_VALID 0x20000000 |
1234 | #define CB_INT_ENABLED 0x40000000 | 1477 | #define CB_INT_ENABLED 0x40000000 |
@@ -1247,63 +1490,63 @@ do { if (ipw_debug_level & (level)) \ | |||
1247 | #define DMA_CB_STOP_AND_ABORT 0x00000C00 | 1490 | #define DMA_CB_STOP_AND_ABORT 0x00000C00 |
1248 | #define DMA_CB_START 0x00000100 | 1491 | #define DMA_CB_START 0x00000100 |
1249 | 1492 | ||
1250 | #define CX2_SHARED_SRAM_SIZE 0x00030000 | 1493 | #define IPW_SHARED_SRAM_SIZE 0x00030000 |
1251 | #define CX2_SHARED_SRAM_DMA_CONTROL 0x00027000 | 1494 | #define IPW_SHARED_SRAM_DMA_CONTROL 0x00027000 |
1252 | #define CB_MAX_LENGTH 0x1FFF | 1495 | #define CB_MAX_LENGTH 0x1FFF |
1253 | 1496 | ||
1254 | #define CX2_HOST_EEPROM_DATA_SRAM_SIZE 0xA18 | 1497 | #define IPW_HOST_EEPROM_DATA_SRAM_SIZE 0xA18 |
1255 | #define CX2_EEPROM_IMAGE_SIZE 0x100 | 1498 | #define IPW_EEPROM_IMAGE_SIZE 0x100 |
1256 | 1499 | ||
1257 | /* DMA defs */ | 1500 | /* DMA defs */ |
1258 | #define CX2_DMA_I_CURRENT_CB 0x003000D0 | 1501 | #define IPW_DMA_I_CURRENT_CB 0x003000D0 |
1259 | #define CX2_DMA_O_CURRENT_CB 0x003000D4 | 1502 | #define IPW_DMA_O_CURRENT_CB 0x003000D4 |
1260 | #define CX2_DMA_I_DMA_CONTROL 0x003000A4 | 1503 | #define IPW_DMA_I_DMA_CONTROL 0x003000A4 |
1261 | #define CX2_DMA_I_CB_BASE 0x003000A0 | 1504 | #define IPW_DMA_I_CB_BASE 0x003000A0 |
1262 | 1505 | ||
1263 | #define CX2_TX_CMD_QUEUE_BD_BASE (0x00000200) | 1506 | #define IPW_TX_CMD_QUEUE_BD_BASE 0x00000200 |
1264 | #define CX2_TX_CMD_QUEUE_BD_SIZE (0x00000204) | 1507 | #define IPW_TX_CMD_QUEUE_BD_SIZE 0x00000204 |
1265 | #define CX2_TX_QUEUE_0_BD_BASE (0x00000208) | 1508 | #define IPW_TX_QUEUE_0_BD_BASE 0x00000208 |
1266 | #define CX2_TX_QUEUE_0_BD_SIZE (0x0000020C) | 1509 | #define IPW_TX_QUEUE_0_BD_SIZE (0x0000020C) |
1267 | #define CX2_TX_QUEUE_1_BD_BASE (0x00000210) | 1510 | #define IPW_TX_QUEUE_1_BD_BASE 0x00000210 |
1268 | #define CX2_TX_QUEUE_1_BD_SIZE (0x00000214) | 1511 | #define IPW_TX_QUEUE_1_BD_SIZE 0x00000214 |
1269 | #define CX2_TX_QUEUE_2_BD_BASE (0x00000218) | 1512 | #define IPW_TX_QUEUE_2_BD_BASE 0x00000218 |
1270 | #define CX2_TX_QUEUE_2_BD_SIZE (0x0000021C) | 1513 | #define IPW_TX_QUEUE_2_BD_SIZE (0x0000021C) |
1271 | #define CX2_TX_QUEUE_3_BD_BASE (0x00000220) | 1514 | #define IPW_TX_QUEUE_3_BD_BASE 0x00000220 |
1272 | #define CX2_TX_QUEUE_3_BD_SIZE (0x00000224) | 1515 | #define IPW_TX_QUEUE_3_BD_SIZE 0x00000224 |
1273 | #define CX2_RX_BD_BASE (0x00000240) | 1516 | #define IPW_RX_BD_BASE 0x00000240 |
1274 | #define CX2_RX_BD_SIZE (0x00000244) | 1517 | #define IPW_RX_BD_SIZE 0x00000244 |
1275 | #define CX2_RFDS_TABLE_LOWER (0x00000500) | 1518 | #define IPW_RFDS_TABLE_LOWER 0x00000500 |
1276 | 1519 | ||
1277 | #define CX2_TX_CMD_QUEUE_READ_INDEX (0x00000280) | 1520 | #define IPW_TX_CMD_QUEUE_READ_INDEX 0x00000280 |
1278 | #define CX2_TX_QUEUE_0_READ_INDEX (0x00000284) | 1521 | #define IPW_TX_QUEUE_0_READ_INDEX 0x00000284 |
1279 | #define CX2_TX_QUEUE_1_READ_INDEX (0x00000288) | 1522 | #define IPW_TX_QUEUE_1_READ_INDEX 0x00000288 |
1280 | #define CX2_TX_QUEUE_2_READ_INDEX (0x0000028C) | 1523 | #define IPW_TX_QUEUE_2_READ_INDEX (0x0000028C) |
1281 | #define CX2_TX_QUEUE_3_READ_INDEX (0x00000290) | 1524 | #define IPW_TX_QUEUE_3_READ_INDEX 0x00000290 |
1282 | #define CX2_RX_READ_INDEX (0x000002A0) | 1525 | #define IPW_RX_READ_INDEX (0x000002A0) |
1283 | 1526 | ||
1284 | #define CX2_TX_CMD_QUEUE_WRITE_INDEX (0x00000F80) | 1527 | #define IPW_TX_CMD_QUEUE_WRITE_INDEX (0x00000F80) |
1285 | #define CX2_TX_QUEUE_0_WRITE_INDEX (0x00000F84) | 1528 | #define IPW_TX_QUEUE_0_WRITE_INDEX (0x00000F84) |
1286 | #define CX2_TX_QUEUE_1_WRITE_INDEX (0x00000F88) | 1529 | #define IPW_TX_QUEUE_1_WRITE_INDEX (0x00000F88) |
1287 | #define CX2_TX_QUEUE_2_WRITE_INDEX (0x00000F8C) | 1530 | #define IPW_TX_QUEUE_2_WRITE_INDEX (0x00000F8C) |
1288 | #define CX2_TX_QUEUE_3_WRITE_INDEX (0x00000F90) | 1531 | #define IPW_TX_QUEUE_3_WRITE_INDEX (0x00000F90) |
1289 | #define CX2_RX_WRITE_INDEX (0x00000FA0) | 1532 | #define IPW_RX_WRITE_INDEX (0x00000FA0) |
1290 | 1533 | ||
1291 | /* | 1534 | /* |
1292 | * EEPROM Related Definitions | 1535 | * EEPROM Related Definitions |
1293 | */ | 1536 | */ |
1294 | 1537 | ||
1295 | #define IPW_EEPROM_DATA_SRAM_ADDRESS (CX2_SHARED_LOWER_BOUND + 0x814) | 1538 | #define IPW_EEPROM_DATA_SRAM_ADDRESS (IPW_SHARED_LOWER_BOUND + 0x814) |
1296 | #define IPW_EEPROM_DATA_SRAM_SIZE (CX2_SHARED_LOWER_BOUND + 0x818) | 1539 | #define IPW_EEPROM_DATA_SRAM_SIZE (IPW_SHARED_LOWER_BOUND + 0x818) |
1297 | #define IPW_EEPROM_LOAD_DISABLE (CX2_SHARED_LOWER_BOUND + 0x81C) | 1540 | #define IPW_EEPROM_LOAD_DISABLE (IPW_SHARED_LOWER_BOUND + 0x81C) |
1298 | #define IPW_EEPROM_DATA (CX2_SHARED_LOWER_BOUND + 0x820) | 1541 | #define IPW_EEPROM_DATA (IPW_SHARED_LOWER_BOUND + 0x820) |
1299 | #define IPW_EEPROM_UPPER_ADDRESS (CX2_SHARED_LOWER_BOUND + 0x9E0) | 1542 | #define IPW_EEPROM_UPPER_ADDRESS (IPW_SHARED_LOWER_BOUND + 0x9E0) |
1300 | 1543 | ||
1301 | #define IPW_STATION_TABLE_LOWER (CX2_SHARED_LOWER_BOUND + 0xA0C) | 1544 | #define IPW_STATION_TABLE_LOWER (IPW_SHARED_LOWER_BOUND + 0xA0C) |
1302 | #define IPW_STATION_TABLE_UPPER (CX2_SHARED_LOWER_BOUND + 0xB0C) | 1545 | #define IPW_STATION_TABLE_UPPER (IPW_SHARED_LOWER_BOUND + 0xB0C) |
1303 | #define IPW_REQUEST_ATIM (CX2_SHARED_LOWER_BOUND + 0xB0C) | 1546 | #define IPW_REQUEST_ATIM (IPW_SHARED_LOWER_BOUND + 0xB0C) |
1304 | #define IPW_ATIM_SENT (CX2_SHARED_LOWER_BOUND + 0xB10) | 1547 | #define IPW_ATIM_SENT (IPW_SHARED_LOWER_BOUND + 0xB10) |
1305 | #define IPW_WHO_IS_AWAKE (CX2_SHARED_LOWER_BOUND + 0xB14) | 1548 | #define IPW_WHO_IS_AWAKE (IPW_SHARED_LOWER_BOUND + 0xB14) |
1306 | #define IPW_DURING_ATIM_WINDOW (CX2_SHARED_LOWER_BOUND + 0xB18) | 1549 | #define IPW_DURING_ATIM_WINDOW (IPW_SHARED_LOWER_BOUND + 0xB18) |
1307 | 1550 | ||
1308 | #define MSB 1 | 1551 | #define MSB 1 |
1309 | #define LSB 0 | 1552 | #define LSB 0 |
@@ -1325,15 +1568,15 @@ do { if (ipw_debug_level & (level)) \ | |||
1325 | #define EEPROM_HW_VERSION (GET_EEPROM_ADDR(0x72,LSB)) /* 2 bytes */ | 1568 | #define EEPROM_HW_VERSION (GET_EEPROM_ADDR(0x72,LSB)) /* 2 bytes */ |
1326 | 1569 | ||
1327 | /* NIC type as found in the one byte EEPROM_NIC_TYPE offset*/ | 1570 | /* NIC type as found in the one byte EEPROM_NIC_TYPE offset*/ |
1328 | #define EEPROM_NIC_TYPE_STANDARD 0 | 1571 | #define EEPROM_NIC_TYPE_0 0 |
1329 | #define EEPROM_NIC_TYPE_DELL 1 | 1572 | #define EEPROM_NIC_TYPE_1 1 |
1330 | #define EEPROM_NIC_TYPE_FUJITSU 2 | 1573 | #define EEPROM_NIC_TYPE_2 2 |
1331 | #define EEPROM_NIC_TYPE_IBM 3 | 1574 | #define EEPROM_NIC_TYPE_3 3 |
1332 | #define EEPROM_NIC_TYPE_HP 4 | 1575 | #define EEPROM_NIC_TYPE_4 4 |
1333 | 1576 | ||
1334 | #define FW_MEM_REG_LOWER_BOUND 0x00300000 | 1577 | #define FW_MEM_REG_LOWER_BOUND 0x00300000 |
1335 | #define FW_MEM_REG_EEPROM_ACCESS (FW_MEM_REG_LOWER_BOUND + 0x40) | 1578 | #define FW_MEM_REG_EEPROM_ACCESS (FW_MEM_REG_LOWER_BOUND + 0x40) |
1336 | 1579 | #define IPW_EVENT_REG (FW_MEM_REG_LOWER_BOUND + 0x04) | |
1337 | #define EEPROM_BIT_SK (1<<0) | 1580 | #define EEPROM_BIT_SK (1<<0) |
1338 | #define EEPROM_BIT_CS (1<<1) | 1581 | #define EEPROM_BIT_CS (1<<1) |
1339 | #define EEPROM_BIT_DI (1<<2) | 1582 | #define EEPROM_BIT_DI (1<<2) |
@@ -1342,50 +1585,47 @@ do { if (ipw_debug_level & (level)) \ | |||
1342 | #define EEPROM_CMD_READ 0x2 | 1585 | #define EEPROM_CMD_READ 0x2 |
1343 | 1586 | ||
1344 | /* Interrupts masks */ | 1587 | /* Interrupts masks */ |
1345 | #define CX2_INTA_NONE 0x00000000 | 1588 | #define IPW_INTA_NONE 0x00000000 |
1346 | 1589 | ||
1347 | #define CX2_INTA_BIT_RX_TRANSFER 0x00000002 | 1590 | #define IPW_INTA_BIT_RX_TRANSFER 0x00000002 |
1348 | #define CX2_INTA_BIT_STATUS_CHANGE 0x00000010 | 1591 | #define IPW_INTA_BIT_STATUS_CHANGE 0x00000010 |
1349 | #define CX2_INTA_BIT_BEACON_PERIOD_EXPIRED 0x00000020 | 1592 | #define IPW_INTA_BIT_BEACON_PERIOD_EXPIRED 0x00000020 |
1350 | 1593 | ||
1351 | //Inta Bits for CF | 1594 | //Inta Bits for CF |
1352 | #define CX2_INTA_BIT_TX_CMD_QUEUE 0x00000800 | 1595 | #define IPW_INTA_BIT_TX_CMD_QUEUE 0x00000800 |
1353 | #define CX2_INTA_BIT_TX_QUEUE_1 0x00001000 | 1596 | #define IPW_INTA_BIT_TX_QUEUE_1 0x00001000 |
1354 | #define CX2_INTA_BIT_TX_QUEUE_2 0x00002000 | 1597 | #define IPW_INTA_BIT_TX_QUEUE_2 0x00002000 |
1355 | #define CX2_INTA_BIT_TX_QUEUE_3 0x00004000 | 1598 | #define IPW_INTA_BIT_TX_QUEUE_3 0x00004000 |
1356 | #define CX2_INTA_BIT_TX_QUEUE_4 0x00008000 | 1599 | #define IPW_INTA_BIT_TX_QUEUE_4 0x00008000 |
1357 | 1600 | ||
1358 | #define CX2_INTA_BIT_SLAVE_MODE_HOST_CMD_DONE 0x00010000 | 1601 | #define IPW_INTA_BIT_SLAVE_MODE_HOST_CMD_DONE 0x00010000 |
1359 | 1602 | ||
1360 | #define CX2_INTA_BIT_PREPARE_FOR_POWER_DOWN 0x00100000 | 1603 | #define IPW_INTA_BIT_PREPARE_FOR_POWER_DOWN 0x00100000 |
1361 | #define CX2_INTA_BIT_POWER_DOWN 0x00200000 | 1604 | #define IPW_INTA_BIT_POWER_DOWN 0x00200000 |
1362 | 1605 | ||
1363 | #define CX2_INTA_BIT_FW_INITIALIZATION_DONE 0x01000000 | 1606 | #define IPW_INTA_BIT_FW_INITIALIZATION_DONE 0x01000000 |
1364 | #define CX2_INTA_BIT_FW_CARD_DISABLE_PHY_OFF_DONE 0x02000000 | 1607 | #define IPW_INTA_BIT_FW_CARD_DISABLE_PHY_OFF_DONE 0x02000000 |
1365 | #define CX2_INTA_BIT_RF_KILL_DONE 0x04000000 | 1608 | #define IPW_INTA_BIT_RF_KILL_DONE 0x04000000 |
1366 | #define CX2_INTA_BIT_FATAL_ERROR 0x40000000 | 1609 | #define IPW_INTA_BIT_FATAL_ERROR 0x40000000 |
1367 | #define CX2_INTA_BIT_PARITY_ERROR 0x80000000 | 1610 | #define IPW_INTA_BIT_PARITY_ERROR 0x80000000 |
1368 | 1611 | ||
1369 | /* Interrupts enabled at init time. */ | 1612 | /* Interrupts enabled at init time. */ |
1370 | #define CX2_INTA_MASK_ALL \ | 1613 | #define IPW_INTA_MASK_ALL \ |
1371 | (CX2_INTA_BIT_TX_QUEUE_1 | \ | 1614 | (IPW_INTA_BIT_TX_QUEUE_1 | \ |
1372 | CX2_INTA_BIT_TX_QUEUE_2 | \ | 1615 | IPW_INTA_BIT_TX_QUEUE_2 | \ |
1373 | CX2_INTA_BIT_TX_QUEUE_3 | \ | 1616 | IPW_INTA_BIT_TX_QUEUE_3 | \ |
1374 | CX2_INTA_BIT_TX_QUEUE_4 | \ | 1617 | IPW_INTA_BIT_TX_QUEUE_4 | \ |
1375 | CX2_INTA_BIT_TX_CMD_QUEUE | \ | 1618 | IPW_INTA_BIT_TX_CMD_QUEUE | \ |
1376 | CX2_INTA_BIT_RX_TRANSFER | \ | 1619 | IPW_INTA_BIT_RX_TRANSFER | \ |
1377 | CX2_INTA_BIT_FATAL_ERROR | \ | 1620 | IPW_INTA_BIT_FATAL_ERROR | \ |
1378 | CX2_INTA_BIT_PARITY_ERROR | \ | 1621 | IPW_INTA_BIT_PARITY_ERROR | \ |
1379 | CX2_INTA_BIT_STATUS_CHANGE | \ | 1622 | IPW_INTA_BIT_STATUS_CHANGE | \ |
1380 | CX2_INTA_BIT_FW_INITIALIZATION_DONE | \ | 1623 | IPW_INTA_BIT_FW_INITIALIZATION_DONE | \ |
1381 | CX2_INTA_BIT_BEACON_PERIOD_EXPIRED | \ | 1624 | IPW_INTA_BIT_BEACON_PERIOD_EXPIRED | \ |
1382 | CX2_INTA_BIT_SLAVE_MODE_HOST_CMD_DONE | \ | 1625 | IPW_INTA_BIT_SLAVE_MODE_HOST_CMD_DONE | \ |
1383 | CX2_INTA_BIT_PREPARE_FOR_POWER_DOWN | \ | 1626 | IPW_INTA_BIT_PREPARE_FOR_POWER_DOWN | \ |
1384 | CX2_INTA_BIT_POWER_DOWN | \ | 1627 | IPW_INTA_BIT_POWER_DOWN | \ |
1385 | CX2_INTA_BIT_RF_KILL_DONE ) | 1628 | IPW_INTA_BIT_RF_KILL_DONE ) |
1386 | |||
1387 | #define IPWSTATUS_ERROR_LOG (CX2_SHARED_LOWER_BOUND + 0x410) | ||
1388 | #define IPW_EVENT_LOG (CX2_SHARED_LOWER_BOUND + 0x414) | ||
1389 | 1629 | ||
1390 | /* FW event log definitions */ | 1630 | /* FW event log definitions */ |
1391 | #define EVENT_ELEM_SIZE (3 * sizeof(u32)) | 1631 | #define EVENT_ELEM_SIZE (3 * sizeof(u32)) |
@@ -1395,6 +1635,11 @@ do { if (ipw_debug_level & (level)) \ | |||
1395 | #define ERROR_ELEM_SIZE (7 * sizeof(u32)) | 1635 | #define ERROR_ELEM_SIZE (7 * sizeof(u32)) |
1396 | #define ERROR_START_OFFSET (1 * sizeof(u32)) | 1636 | #define ERROR_START_OFFSET (1 * sizeof(u32)) |
1397 | 1637 | ||
1638 | /* TX power level (dbm) */ | ||
1639 | #define IPW_TX_POWER_MIN -12 | ||
1640 | #define IPW_TX_POWER_MAX 20 | ||
1641 | #define IPW_TX_POWER_DEFAULT IPW_TX_POWER_MAX | ||
1642 | |||
1398 | enum { | 1643 | enum { |
1399 | IPW_FW_ERROR_OK = 0, | 1644 | IPW_FW_ERROR_OK = 0, |
1400 | IPW_FW_ERROR_FAIL, | 1645 | IPW_FW_ERROR_FAIL, |
@@ -1407,8 +1652,8 @@ enum { | |||
1407 | IPW_FW_ERROR_ALLOC_FAIL, | 1652 | IPW_FW_ERROR_ALLOC_FAIL, |
1408 | IPW_FW_ERROR_DMA_UNDERRUN, | 1653 | IPW_FW_ERROR_DMA_UNDERRUN, |
1409 | IPW_FW_ERROR_DMA_STATUS, | 1654 | IPW_FW_ERROR_DMA_STATUS, |
1410 | IPW_FW_ERROR_DINOSTATUS_ERROR, | 1655 | IPW_FW_ERROR_DINO_ERROR, |
1411 | IPW_FW_ERROR_EEPROMSTATUS_ERROR, | 1656 | IPW_FW_ERROR_EEPROM_ERROR, |
1412 | IPW_FW_ERROR_SYSASSERT, | 1657 | IPW_FW_ERROR_SYSASSERT, |
1413 | IPW_FW_ERROR_FATAL_ERROR | 1658 | IPW_FW_ERROR_FATAL_ERROR |
1414 | }; | 1659 | }; |
@@ -1424,6 +1669,8 @@ enum { | |||
1424 | #define HC_IBSS_RECONF 4 | 1669 | #define HC_IBSS_RECONF 4 |
1425 | #define HC_DISASSOC_QUIET 5 | 1670 | #define HC_DISASSOC_QUIET 5 |
1426 | 1671 | ||
1672 | #define HC_QOS_SUPPORT_ASSOC 0x01 | ||
1673 | |||
1427 | #define IPW_RATE_CAPABILITIES 1 | 1674 | #define IPW_RATE_CAPABILITIES 1 |
1428 | #define IPW_RATE_CONNECT 0 | 1675 | #define IPW_RATE_CONNECT 0 |
1429 | 1676 | ||
@@ -1594,18 +1841,20 @@ enum { | |||
1594 | IPW_ORD_TABLE_7_LAST | 1841 | IPW_ORD_TABLE_7_LAST |
1595 | }; | 1842 | }; |
1596 | 1843 | ||
1597 | #define IPW_ORDINALS_TABLE_LOWER (CX2_SHARED_LOWER_BOUND + 0x500) | 1844 | #define IPW_ERROR_LOG (IPW_SHARED_LOWER_BOUND + 0x410) |
1598 | #define IPW_ORDINALS_TABLE_0 (CX2_SHARED_LOWER_BOUND + 0x180) | 1845 | #define IPW_EVENT_LOG (IPW_SHARED_LOWER_BOUND + 0x414) |
1599 | #define IPW_ORDINALS_TABLE_1 (CX2_SHARED_LOWER_BOUND + 0x184) | 1846 | #define IPW_ORDINALS_TABLE_LOWER (IPW_SHARED_LOWER_BOUND + 0x500) |
1600 | #define IPW_ORDINALS_TABLE_2 (CX2_SHARED_LOWER_BOUND + 0x188) | 1847 | #define IPW_ORDINALS_TABLE_0 (IPW_SHARED_LOWER_BOUND + 0x180) |
1601 | #define IPW_MEM_FIXED_OVERRIDE (CX2_SHARED_LOWER_BOUND + 0x41C) | 1848 | #define IPW_ORDINALS_TABLE_1 (IPW_SHARED_LOWER_BOUND + 0x184) |
1849 | #define IPW_ORDINALS_TABLE_2 (IPW_SHARED_LOWER_BOUND + 0x188) | ||
1850 | #define IPW_MEM_FIXED_OVERRIDE (IPW_SHARED_LOWER_BOUND + 0x41C) | ||
1602 | 1851 | ||
1603 | struct ipw_fixed_rate { | 1852 | struct ipw_fixed_rate { |
1604 | u16 tx_rates; | 1853 | u16 tx_rates; |
1605 | u16 reserved; | 1854 | u16 reserved; |
1606 | } __attribute__ ((packed)); | 1855 | } __attribute__ ((packed)); |
1607 | 1856 | ||
1608 | #define CX2_INDIRECT_ADDR_MASK (~0x3ul) | 1857 | #define IPW_INDIRECT_ADDR_MASK (~0x3ul) |
1609 | 1858 | ||
1610 | struct host_cmd { | 1859 | struct host_cmd { |
1611 | u8 cmd; | 1860 | u8 cmd; |
@@ -1614,6 +1863,12 @@ struct host_cmd { | |||
1614 | u32 param[TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH]; | 1863 | u32 param[TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH]; |
1615 | } __attribute__ ((packed)); | 1864 | } __attribute__ ((packed)); |
1616 | 1865 | ||
1866 | struct ipw_cmd_log { | ||
1867 | unsigned long jiffies; | ||
1868 | int retcode; | ||
1869 | struct host_cmd cmd; | ||
1870 | }; | ||
1871 | |||
1617 | #define CFG_BT_COEXISTENCE_MIN 0x00 | 1872 | #define CFG_BT_COEXISTENCE_MIN 0x00 |
1618 | #define CFG_BT_COEXISTENCE_DEFER 0x02 | 1873 | #define CFG_BT_COEXISTENCE_DEFER 0x02 |
1619 | #define CFG_BT_COEXISTENCE_KILL 0x04 | 1874 | #define CFG_BT_COEXISTENCE_KILL 0x04 |
@@ -1642,15 +1897,6 @@ struct host_cmd { | |||
1642 | #define REG_CHANNEL_MASK 0x00003FFF | 1897 | #define REG_CHANNEL_MASK 0x00003FFF |
1643 | #define IPW_IBSS_11B_DEFAULT_MASK 0x87ff | 1898 | #define IPW_IBSS_11B_DEFAULT_MASK 0x87ff |
1644 | 1899 | ||
1645 | static const long ipw_frequencies[] = { | ||
1646 | 2412, 2417, 2422, 2427, | ||
1647 | 2432, 2437, 2442, 2447, | ||
1648 | 2452, 2457, 2462, 2467, | ||
1649 | 2472, 2484 | ||
1650 | }; | ||
1651 | |||
1652 | #define FREQ_COUNT ARRAY_SIZE(ipw_frequencies) | ||
1653 | |||
1654 | #define IPW_MAX_CONFIG_RETRIES 10 | 1900 | #define IPW_MAX_CONFIG_RETRIES 10 |
1655 | 1901 | ||
1656 | static inline u32 frame_hdr_len(struct ieee80211_hdr_4addr *hdr) | 1902 | static inline u32 frame_hdr_len(struct ieee80211_hdr_4addr *hdr) |