diff options
Diffstat (limited to 'drivers/net/wireless/ipw2200.h')
-rw-r--r-- | drivers/net/wireless/ipw2200.h | 575 |
1 files changed, 410 insertions, 165 deletions
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h index e9cf32bf3e31..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 |
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/config.h> | 34 | #include <linux/config.h> |
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | 36 | ||
37 | #include <linux/version.h> | ||
38 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
39 | #include <linux/netdevice.h> | 38 | #include <linux/netdevice.h> |
40 | #include <linux/ethtool.h> | 39 | #include <linux/ethtool.h> |
@@ -50,6 +49,7 @@ | |||
50 | #include <asm/io.h> | 49 | #include <asm/io.h> |
51 | 50 | ||
52 | #include <net/ieee80211.h> | 51 | #include <net/ieee80211.h> |
52 | #include <net/ieee80211_radiotap.h> | ||
53 | 53 | ||
54 | #define DRV_NAME "ipw2200" | 54 | #define DRV_NAME "ipw2200" |
55 | 55 | ||
@@ -161,6 +161,16 @@ enum connection_manager_assoc_states { | |||
161 | * TX Queue Flag Definitions | 161 | * TX Queue Flag Definitions |
162 | */ | 162 | */ |
163 | 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 | |||
164 | /* abort attempt if mgmt frame is rx'd */ | 174 | /* abort attempt if mgmt frame is rx'd */ |
165 | #define DCT_FLAG_ABORT_MGMT 0x01 | 175 | #define DCT_FLAG_ABORT_MGMT 0x01 |
166 | 176 | ||
@@ -168,7 +178,8 @@ enum connection_manager_assoc_states { | |||
168 | #define DCT_FLAG_CTS_REQUIRED 0x02 | 178 | #define DCT_FLAG_CTS_REQUIRED 0x02 |
169 | 179 | ||
170 | /* use short preamble */ | 180 | /* use short preamble */ |
171 | #define DCT_FLAG_SHORT_PREMBL 0x04 | 181 | #define DCT_FLAG_LONG_PREAMBLE 0x00 |
182 | #define DCT_FLAG_SHORT_PREAMBLE 0x04 | ||
172 | 183 | ||
173 | /* RTS/CTS first */ | 184 | /* RTS/CTS first */ |
174 | #define DCT_FLAG_RTS_REQD 0x08 | 185 | #define DCT_FLAG_RTS_REQD 0x08 |
@@ -185,9 +196,23 @@ enum connection_manager_assoc_states { | |||
185 | /* ACK rx is expected to follow */ | 196 | /* ACK rx is expected to follow */ |
186 | #define DCT_FLAG_ACK_REQD 0x80 | 197 | #define DCT_FLAG_ACK_REQD 0x80 |
187 | 198 | ||
199 | /* TX flags extension */ | ||
188 | #define DCT_FLAG_EXT_MODE_CCK 0x01 | 200 | #define DCT_FLAG_EXT_MODE_CCK 0x01 |
189 | #define DCT_FLAG_EXT_MODE_OFDM 0x00 | 201 | #define DCT_FLAG_EXT_MODE_OFDM 0x00 |
190 | 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 | |||
191 | #define TX_RX_TYPE_MASK 0xFF | 216 | #define TX_RX_TYPE_MASK 0xFF |
192 | #define TX_FRAME_TYPE 0x00 | 217 | #define TX_FRAME_TYPE 0x00 |
193 | #define TX_HOST_COMMAND_TYPE 0x01 | 218 | #define TX_HOST_COMMAND_TYPE 0x01 |
@@ -233,6 +258,117 @@ enum connection_manager_assoc_states { | |||
233 | #define DCR_TYPE_SNIFFER 0x06 | 258 | #define DCR_TYPE_SNIFFER 0x06 |
234 | #define DCR_TYPE_MU_BSS DCR_TYPE_MU_ESS | 259 | #define DCR_TYPE_MU_BSS DCR_TYPE_MU_ESS |
235 | 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 | /**************************************************************/ | ||
236 | /** | 372 | /** |
237 | * Generic queue structure | 373 | * Generic queue structure |
238 | * | 374 | * |
@@ -402,9 +538,9 @@ struct clx2_tx_queue { | |||
402 | #define RX_FREE_BUFFERS 32 | 538 | #define RX_FREE_BUFFERS 32 |
403 | #define RX_LOW_WATERMARK 8 | 539 | #define RX_LOW_WATERMARK 8 |
404 | 540 | ||
405 | #define SUP_RATE_11A_MAX_NUM_CHANNELS (8) | 541 | #define SUP_RATE_11A_MAX_NUM_CHANNELS 8 |
406 | #define SUP_RATE_11B_MAX_NUM_CHANNELS (4) | 542 | #define SUP_RATE_11B_MAX_NUM_CHANNELS 4 |
407 | #define SUP_RATE_11G_MAX_NUM_CHANNELS (12) | 543 | #define SUP_RATE_11G_MAX_NUM_CHANNELS 12 |
408 | 544 | ||
409 | // 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 |
410 | struct rate_histogram { | 546 | struct rate_histogram { |
@@ -453,6 +589,9 @@ struct notif_channel_result { | |||
453 | u8 uReserved; | 589 | u8 uReserved; |
454 | } __attribute__ ((packed)); | 590 | } __attribute__ ((packed)); |
455 | 591 | ||
592 | #define SCAN_COMPLETED_STATUS_COMPLETE 1 | ||
593 | #define SCAN_COMPLETED_STATUS_ABORTED 2 | ||
594 | |||
456 | struct notif_scan_complete { | 595 | struct notif_scan_complete { |
457 | u8 scan_type; | 596 | u8 scan_type; |
458 | u8 num_channels; | 597 | u8 num_channels; |
@@ -563,8 +702,8 @@ struct ipw_rx_packet { | |||
563 | } __attribute__ ((packed)); | 702 | } __attribute__ ((packed)); |
564 | 703 | ||
565 | #define IPW_RX_NOTIFICATION_SIZE sizeof(struct ipw_rx_header) + 12 | 704 | #define IPW_RX_NOTIFICATION_SIZE sizeof(struct ipw_rx_header) + 12 |
566 | #define IPW_RX_FRAME_SIZE sizeof(struct ipw_rx_header) + \ | 705 | #define IPW_RX_FRAME_SIZE (unsigned int)(sizeof(struct ipw_rx_header) + \ |
567 | sizeof(struct ipw_rx_frame) | 706 | sizeof(struct ipw_rx_frame)) |
568 | 707 | ||
569 | struct ipw_rx_mem_buffer { | 708 | struct ipw_rx_mem_buffer { |
570 | dma_addr_t dma_addr; | 709 | dma_addr_t dma_addr; |
@@ -657,6 +796,19 @@ struct ipw_multicast_addr { | |||
657 | u8 mac4[6]; | 796 | u8 mac4[6]; |
658 | } __attribute__ ((packed)); | 797 | } __attribute__ ((packed)); |
659 | 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 | |||
660 | struct ipw_wep_key { | 812 | struct ipw_wep_key { |
661 | u8 cmd_id; | 813 | u8 cmd_id; |
662 | u8 seq_num; | 814 | u8 seq_num; |
@@ -818,14 +970,6 @@ struct ipw_tx_power { | |||
818 | struct ipw_channel_tx_power channels_tx_power[MAX_A_CHANNELS]; | 970 | struct ipw_channel_tx_power channels_tx_power[MAX_A_CHANNELS]; |
819 | } __attribute__ ((packed)); | 971 | } __attribute__ ((packed)); |
820 | 972 | ||
821 | struct ipw_qos_parameters { | ||
822 | u16 cw_min[4]; | ||
823 | u16 cw_max[4]; | ||
824 | u8 aifs[4]; | ||
825 | u8 flag[4]; | ||
826 | u16 tx_op_limit[4]; | ||
827 | } __attribute__ ((packed)); | ||
828 | |||
829 | struct ipw_rsn_capabilities { | 973 | struct ipw_rsn_capabilities { |
830 | u8 id; | 974 | u8 id; |
831 | u8 length; | 975 | u8 length; |
@@ -888,6 +1032,10 @@ struct ipw_cmd { | |||
888 | #define STATUS_SCAN_PENDING (1<<20) | 1032 | #define STATUS_SCAN_PENDING (1<<20) |
889 | #define STATUS_SCANNING (1<<21) | 1033 | #define STATUS_SCANNING (1<<21) |
890 | #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) | ||
891 | 1039 | ||
892 | #define STATUS_INDIRECT_BYTE (1<<28) /* sysfs entry configured for access */ | 1040 | #define STATUS_INDIRECT_BYTE (1<<28) /* sysfs entry configured for access */ |
893 | #define STATUS_INDIRECT_DWORD (1<<29) /* sysfs entry configured for access */ | 1041 | #define STATUS_INDIRECT_DWORD (1<<29) /* sysfs entry configured for access */ |
@@ -899,11 +1047,15 @@ struct ipw_cmd { | |||
899 | #define CFG_STATIC_ESSID (1<<1) /* Restrict assoc. to single SSID */ | 1047 | #define CFG_STATIC_ESSID (1<<1) /* Restrict assoc. to single SSID */ |
900 | #define CFG_STATIC_BSSID (1<<2) /* Restrict assoc. to single BSSID */ | 1048 | #define CFG_STATIC_BSSID (1<<2) /* Restrict assoc. to single BSSID */ |
901 | #define CFG_CUSTOM_MAC (1<<3) | 1049 | #define CFG_CUSTOM_MAC (1<<3) |
902 | #define CFG_PREAMBLE (1<<4) | 1050 | #define CFG_PREAMBLE_LONG (1<<4) |
903 | #define CFG_ADHOC_PERSIST (1<<5) | 1051 | #define CFG_ADHOC_PERSIST (1<<5) |
904 | #define CFG_ASSOCIATE (1<<6) | 1052 | #define CFG_ASSOCIATE (1<<6) |
905 | #define CFG_FIXED_RATE (1<<7) | 1053 | #define CFG_FIXED_RATE (1<<7) |
906 | #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) | ||
907 | 1059 | ||
908 | #define CAP_SHARED_KEY (1<<0) /* Off = OPEN */ | 1060 | #define CAP_SHARED_KEY (1<<0) /* Off = OPEN */ |
909 | #define CAP_PRIVACY_ON (1<<1) /* Off = No privacy */ | 1061 | #define CAP_PRIVACY_ON (1<<1) /* Off = No privacy */ |
@@ -925,13 +1077,50 @@ struct average { | |||
925 | s32 sum; | 1077 | s32 sum; |
926 | }; | 1078 | }; |
927 | 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 | |||
928 | struct ipw_priv { | 1118 | struct ipw_priv { |
929 | /* ieee device used by generic ieee processing code */ | 1119 | /* ieee device used by generic ieee processing code */ |
930 | struct ieee80211_device *ieee; | 1120 | struct ieee80211_device *ieee; |
931 | struct ieee80211_security sec; | ||
932 | 1121 | ||
933 | /* spinlock */ | ||
934 | spinlock_t lock; | 1122 | spinlock_t lock; |
1123 | struct semaphore sem; | ||
935 | 1124 | ||
936 | /* basic pci-network driver stuff */ | 1125 | /* basic pci-network driver stuff */ |
937 | struct pci_dev *pci_dev; | 1126 | struct pci_dev *pci_dev; |
@@ -966,7 +1155,7 @@ struct ipw_priv { | |||
966 | int rx_bufs_min; /**< minimum number of bufs in Rx queue */ | 1155 | int rx_bufs_min; /**< minimum number of bufs in Rx queue */ |
967 | int rx_pend_max; /**< maximum pending buffers for one IRQ */ | 1156 | int rx_pend_max; /**< maximum pending buffers for one IRQ */ |
968 | u32 hcmd_seq; /**< sequence number for hcmd */ | 1157 | u32 hcmd_seq; /**< sequence number for hcmd */ |
969 | u32 missed_beacon_threshold; | 1158 | u32 disassociate_threshold; |
970 | u32 roaming_threshold; | 1159 | u32 roaming_threshold; |
971 | 1160 | ||
972 | struct ipw_associate assoc_request; | 1161 | struct ipw_associate assoc_request; |
@@ -1007,6 +1196,8 @@ struct ipw_priv { | |||
1007 | u8 mac_addr[ETH_ALEN]; | 1196 | u8 mac_addr[ETH_ALEN]; |
1008 | u8 num_stations; | 1197 | u8 num_stations; |
1009 | u8 stations[MAX_STATIONS][ETH_ALEN]; | 1198 | u8 stations[MAX_STATIONS][ETH_ALEN]; |
1199 | u8 short_retry_limit; | ||
1200 | u8 long_retry_limit; | ||
1010 | 1201 | ||
1011 | u32 notif_missed_beacons; | 1202 | u32 notif_missed_beacons; |
1012 | 1203 | ||
@@ -1024,17 +1215,29 @@ struct ipw_priv { | |||
1024 | u32 tx_packets; | 1215 | u32 tx_packets; |
1025 | u32 quality; | 1216 | u32 quality; |
1026 | 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 | |||
1027 | /* eeprom */ | 1226 | /* eeprom */ |
1028 | u8 eeprom[0x100]; /* 256 bytes of eeprom */ | 1227 | u8 eeprom[0x100]; /* 256 bytes of eeprom */ |
1228 | u8 country[4]; | ||
1029 | int eeprom_delay; | 1229 | int eeprom_delay; |
1030 | 1230 | ||
1031 | struct iw_statistics wstats; | 1231 | struct iw_statistics wstats; |
1032 | 1232 | ||
1233 | struct iw_public_data wireless_data; | ||
1234 | |||
1033 | struct workqueue_struct *workqueue; | 1235 | struct workqueue_struct *workqueue; |
1034 | 1236 | ||
1035 | struct work_struct adhoc_check; | 1237 | struct work_struct adhoc_check; |
1036 | struct work_struct associate; | 1238 | struct work_struct associate; |
1037 | struct work_struct disassociate; | 1239 | struct work_struct disassociate; |
1240 | struct work_struct system_config; | ||
1038 | struct work_struct rx_replenish; | 1241 | struct work_struct rx_replenish; |
1039 | struct work_struct request_scan; | 1242 | struct work_struct request_scan; |
1040 | struct work_struct adapter_restart; | 1243 | struct work_struct adapter_restart; |
@@ -1045,25 +1248,51 @@ struct ipw_priv { | |||
1045 | struct work_struct abort_scan; | 1248 | struct work_struct abort_scan; |
1046 | struct work_struct roam; | 1249 | struct work_struct roam; |
1047 | struct work_struct scan_check; | 1250 | struct work_struct scan_check; |
1251 | struct work_struct link_up; | ||
1252 | struct work_struct link_down; | ||
1048 | 1253 | ||
1049 | struct tasklet_struct irq_tasklet; | 1254 | struct tasklet_struct irq_tasklet; |
1050 | 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 | |||
1051 | #define IPW_2200BG 1 | 1274 | #define IPW_2200BG 1 |
1052 | #define IPW_2915ABG 2 | 1275 | #define IPW_2915ABG 2 |
1053 | u8 adapter; | 1276 | u8 adapter; |
1054 | 1277 | ||
1055 | #define IPW_DEFAULT_TX_POWER 0x14 | 1278 | s8 tx_power; |
1056 | u8 tx_power; | ||
1057 | 1279 | ||
1058 | #ifdef CONFIG_PM | 1280 | #ifdef CONFIG_PM |
1059 | u32 pm_state[16]; | 1281 | u32 pm_state[16]; |
1060 | #endif | 1282 | #endif |
1061 | 1283 | ||
1284 | struct ipw_fw_error *error; | ||
1285 | |||
1062 | /* network state */ | 1286 | /* network state */ |
1063 | 1287 | ||
1064 | /* Used to pass the current INTA value from ISR to Tasklet */ | 1288 | /* Used to pass the current INTA value from ISR to Tasklet */ |
1065 | u32 isr_inta; | 1289 | u32 isr_inta; |
1066 | 1290 | ||
1291 | /* QoS */ | ||
1292 | struct ipw_qos_info qos_data; | ||
1293 | struct work_struct qos_activate; | ||
1294 | /*********************************/ | ||
1295 | |||
1067 | /* debugging info */ | 1296 | /* debugging info */ |
1068 | u32 indirect_dword; | 1297 | u32 indirect_dword; |
1069 | u32 direct_dword; | 1298 | u32 direct_dword; |
@@ -1125,6 +1354,8 @@ do { if (ipw_debug_level & (level)) \ | |||
1125 | #define IPW_DL_RF_KILL (1<<17) | 1354 | #define IPW_DL_RF_KILL (1<<17) |
1126 | #define IPW_DL_FW_ERRORS (1<<18) | 1355 | #define IPW_DL_FW_ERRORS (1<<18) |
1127 | 1356 | ||
1357 | #define IPW_DL_LED (1<<19) | ||
1358 | |||
1128 | #define IPW_DL_ORD (1<<20) | 1359 | #define IPW_DL_ORD (1<<20) |
1129 | 1360 | ||
1130 | #define IPW_DL_FRAG (1<<21) | 1361 | #define IPW_DL_FRAG (1<<21) |
@@ -1137,6 +1368,8 @@ do { if (ipw_debug_level & (level)) \ | |||
1137 | #define IPW_DL_TRACE (1<<28) | 1368 | #define IPW_DL_TRACE (1<<28) |
1138 | 1369 | ||
1139 | #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) | ||
1140 | 1373 | ||
1141 | #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) |
1142 | #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) |
@@ -1150,6 +1383,7 @@ do { if (ipw_debug_level & (level)) \ | |||
1150 | #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) |
1151 | #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) |
1152 | #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) | ||
1153 | #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) |
1154 | #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) |
1155 | #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) |
@@ -1163,6 +1397,8 @@ do { if (ipw_debug_level & (level)) \ | |||
1163 | #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) |
1164 | #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) |
1165 | #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) | ||
1166 | 1402 | ||
1167 | #include <linux/ctype.h> | 1403 | #include <linux/ctype.h> |
1168 | 1404 | ||
@@ -1177,59 +1413,65 @@ do { if (ipw_debug_level & (level)) \ | |||
1177 | #define DINO_RXFIFO_DATA 0x01 | 1413 | #define DINO_RXFIFO_DATA 0x01 |
1178 | #define DINO_CONTROL_REG 0x00200000 | 1414 | #define DINO_CONTROL_REG 0x00200000 |
1179 | 1415 | ||
1180 | #define CX2_INTA_RW 0x00000008 | 1416 | #define IPW_INTA_RW 0x00000008 |
1181 | #define CX2_INTA_MASK_R 0x0000000C | 1417 | #define IPW_INTA_MASK_R 0x0000000C |
1182 | #define CX2_INDIRECT_ADDR 0x00000010 | 1418 | #define IPW_INDIRECT_ADDR 0x00000010 |
1183 | #define CX2_INDIRECT_DATA 0x00000014 | 1419 | #define IPW_INDIRECT_DATA 0x00000014 |
1184 | #define CX2_AUTOINC_ADDR 0x00000018 | 1420 | #define IPW_AUTOINC_ADDR 0x00000018 |
1185 | #define CX2_AUTOINC_DATA 0x0000001C | 1421 | #define IPW_AUTOINC_DATA 0x0000001C |
1186 | #define CX2_RESET_REG 0x00000020 | 1422 | #define IPW_RESET_REG 0x00000020 |
1187 | #define CX2_GP_CNTRL_RW 0x00000024 | 1423 | #define IPW_GP_CNTRL_RW 0x00000024 |
1188 | 1424 | ||
1189 | #define CX2_READ_INT_REGISTER 0xFF4 | 1425 | #define IPW_READ_INT_REGISTER 0xFF4 |
1190 | 1426 | ||
1191 | #define CX2_GP_CNTRL_BIT_INIT_DONE 0x00000004 | 1427 | #define IPW_GP_CNTRL_BIT_INIT_DONE 0x00000004 |
1192 | 1428 | ||
1193 | #define CX2_REGISTER_DOMAIN1_END 0x00001000 | 1429 | #define IPW_REGISTER_DOMAIN1_END 0x00001000 |
1194 | #define CX2_SRAM_READ_INT_REGISTER 0x00000ff4 | 1430 | #define IPW_SRAM_READ_INT_REGISTER 0x00000ff4 |
1195 | 1431 | ||
1196 | #define CX2_SHARED_LOWER_BOUND 0x00000200 | 1432 | #define IPW_SHARED_LOWER_BOUND 0x00000200 |
1197 | #define CX2_INTERRUPT_AREA_LOWER_BOUND 0x00000f80 | 1433 | #define IPW_INTERRUPT_AREA_LOWER_BOUND 0x00000f80 |
1198 | 1434 | ||
1199 | #define CX2_NIC_SRAM_LOWER_BOUND 0x00000000 | 1435 | #define IPW_NIC_SRAM_LOWER_BOUND 0x00000000 |
1200 | #define CX2_NIC_SRAM_UPPER_BOUND 0x00030000 | 1436 | #define IPW_NIC_SRAM_UPPER_BOUND 0x00030000 |
1201 | 1437 | ||
1202 | #define CX2_BIT_INT_HOST_SRAM_READ_INT_REGISTER (1 << 29) | 1438 | #define IPW_BIT_INT_HOST_SRAM_READ_INT_REGISTER (1 << 29) |
1203 | #define CX2_GP_CNTRL_BIT_CLOCK_READY 0x00000001 | 1439 | #define IPW_GP_CNTRL_BIT_CLOCK_READY 0x00000001 |
1204 | #define CX2_GP_CNTRL_BIT_HOST_ALLOWS_STANDBY 0x00000002 | 1440 | #define IPW_GP_CNTRL_BIT_HOST_ALLOWS_STANDBY 0x00000002 |
1205 | 1441 | ||
1206 | /* | 1442 | /* |
1207 | * RESET Register Bit Indexes | 1443 | * RESET Register Bit Indexes |
1208 | */ | 1444 | */ |
1209 | #define CBD_RESET_REG_PRINCETON_RESET 0x00000001 /* Bit 0 (LSB) */ | 1445 | #define CBD_RESET_REG_PRINCETON_RESET (1<<0) |
1210 | #define CX2_RESET_REG_SW_RESET 0x00000080 /* Bit 7 */ | 1446 | #define IPW_START_STANDBY (1<<2) |
1211 | #define CX2_RESET_REG_MASTER_DISABLED 0x00000100 /* Bit 8 */ | 1447 | #define IPW_ACTIVITY_LED (1<<4) |
1212 | #define CX2_RESET_REG_STOP_MASTER 0x00000200 /* Bit 9 */ | 1448 | #define IPW_ASSOCIATED_LED (1<<5) |
1213 | #define CX2_ARC_KESHET_CONFIG 0x08000000 /* Bit 27 */ | 1449 | #define IPW_OFDM_LED (1<<6) |
1214 | #define CX2_START_STANDBY 0x00000004 /* Bit 2 */ | 1450 | #define IPW_RESET_REG_SW_RESET (1<<7) |
1215 | 1451 | #define IPW_RESET_REG_MASTER_DISABLED (1<<8) | |
1216 | #define CX2_CSR_CIS_UPPER_BOUND 0x00000200 | 1452 | #define IPW_RESET_REG_STOP_MASTER (1<<9) |
1217 | #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 | ||
1218 | #define CLX_MEM_BAR_SIZE 0x1000 | 1460 | #define CLX_MEM_BAR_SIZE 0x1000 |
1219 | 1461 | ||
1220 | #define CX2_BASEBAND_CONTROL_STATUS 0X00200000 | 1462 | #define IPW_BASEBAND_CONTROL_STATUS 0X00200000 |
1221 | #define CX2_BASEBAND_TX_FIFO_WRITE 0X00200004 | 1463 | #define IPW_BASEBAND_TX_FIFO_WRITE 0X00200004 |
1222 | #define CX2_BASEBAND_RX_FIFO_READ 0X00200004 | 1464 | #define IPW_BASEBAND_RX_FIFO_READ 0X00200004 |
1223 | #define CX2_BASEBAND_CONTROL_STORE 0X00200010 | 1465 | #define IPW_BASEBAND_CONTROL_STORE 0X00200010 |
1224 | 1466 | ||
1225 | #define CX2_INTERNAL_CMD_EVENT 0X00300004 | 1467 | #define IPW_INTERNAL_CMD_EVENT 0X00300004 |
1226 | #define CX2_BASEBAND_POWER_DOWN 0x00000001 | 1468 | #define IPW_BASEBAND_POWER_DOWN 0x00000001 |
1227 | 1469 | ||
1228 | #define CX2_MEM_HALT_AND_RESET 0x003000e0 | 1470 | #define IPW_MEM_HALT_AND_RESET 0x003000e0 |
1229 | 1471 | ||
1230 | /* defgroup bits_halt_reset MEM_HALT_AND_RESET register bits */ | 1472 | /* defgroup bits_halt_reset MEM_HALT_AND_RESET register bits */ |
1231 | #define CX2_BIT_HALT_RESET_ON 0x80000000 | 1473 | #define IPW_BIT_HALT_RESET_ON 0x80000000 |
1232 | #define CX2_BIT_HALT_RESET_OFF 0x00000000 | 1474 | #define IPW_BIT_HALT_RESET_OFF 0x00000000 |
1233 | 1475 | ||
1234 | #define CB_LAST_VALID 0x20000000 | 1476 | #define CB_LAST_VALID 0x20000000 |
1235 | #define CB_INT_ENABLED 0x40000000 | 1477 | #define CB_INT_ENABLED 0x40000000 |
@@ -1248,63 +1490,63 @@ do { if (ipw_debug_level & (level)) \ | |||
1248 | #define DMA_CB_STOP_AND_ABORT 0x00000C00 | 1490 | #define DMA_CB_STOP_AND_ABORT 0x00000C00 |
1249 | #define DMA_CB_START 0x00000100 | 1491 | #define DMA_CB_START 0x00000100 |
1250 | 1492 | ||
1251 | #define CX2_SHARED_SRAM_SIZE 0x00030000 | 1493 | #define IPW_SHARED_SRAM_SIZE 0x00030000 |
1252 | #define CX2_SHARED_SRAM_DMA_CONTROL 0x00027000 | 1494 | #define IPW_SHARED_SRAM_DMA_CONTROL 0x00027000 |
1253 | #define CB_MAX_LENGTH 0x1FFF | 1495 | #define CB_MAX_LENGTH 0x1FFF |
1254 | 1496 | ||
1255 | #define CX2_HOST_EEPROM_DATA_SRAM_SIZE 0xA18 | 1497 | #define IPW_HOST_EEPROM_DATA_SRAM_SIZE 0xA18 |
1256 | #define CX2_EEPROM_IMAGE_SIZE 0x100 | 1498 | #define IPW_EEPROM_IMAGE_SIZE 0x100 |
1257 | 1499 | ||
1258 | /* DMA defs */ | 1500 | /* DMA defs */ |
1259 | #define CX2_DMA_I_CURRENT_CB 0x003000D0 | 1501 | #define IPW_DMA_I_CURRENT_CB 0x003000D0 |
1260 | #define CX2_DMA_O_CURRENT_CB 0x003000D4 | 1502 | #define IPW_DMA_O_CURRENT_CB 0x003000D4 |
1261 | #define CX2_DMA_I_DMA_CONTROL 0x003000A4 | 1503 | #define IPW_DMA_I_DMA_CONTROL 0x003000A4 |
1262 | #define CX2_DMA_I_CB_BASE 0x003000A0 | 1504 | #define IPW_DMA_I_CB_BASE 0x003000A0 |
1263 | 1505 | ||
1264 | #define CX2_TX_CMD_QUEUE_BD_BASE (0x00000200) | 1506 | #define IPW_TX_CMD_QUEUE_BD_BASE 0x00000200 |
1265 | #define CX2_TX_CMD_QUEUE_BD_SIZE (0x00000204) | 1507 | #define IPW_TX_CMD_QUEUE_BD_SIZE 0x00000204 |
1266 | #define CX2_TX_QUEUE_0_BD_BASE (0x00000208) | 1508 | #define IPW_TX_QUEUE_0_BD_BASE 0x00000208 |
1267 | #define CX2_TX_QUEUE_0_BD_SIZE (0x0000020C) | 1509 | #define IPW_TX_QUEUE_0_BD_SIZE (0x0000020C) |
1268 | #define CX2_TX_QUEUE_1_BD_BASE (0x00000210) | 1510 | #define IPW_TX_QUEUE_1_BD_BASE 0x00000210 |
1269 | #define CX2_TX_QUEUE_1_BD_SIZE (0x00000214) | 1511 | #define IPW_TX_QUEUE_1_BD_SIZE 0x00000214 |
1270 | #define CX2_TX_QUEUE_2_BD_BASE (0x00000218) | 1512 | #define IPW_TX_QUEUE_2_BD_BASE 0x00000218 |
1271 | #define CX2_TX_QUEUE_2_BD_SIZE (0x0000021C) | 1513 | #define IPW_TX_QUEUE_2_BD_SIZE (0x0000021C) |
1272 | #define CX2_TX_QUEUE_3_BD_BASE (0x00000220) | 1514 | #define IPW_TX_QUEUE_3_BD_BASE 0x00000220 |
1273 | #define CX2_TX_QUEUE_3_BD_SIZE (0x00000224) | 1515 | #define IPW_TX_QUEUE_3_BD_SIZE 0x00000224 |
1274 | #define CX2_RX_BD_BASE (0x00000240) | 1516 | #define IPW_RX_BD_BASE 0x00000240 |
1275 | #define CX2_RX_BD_SIZE (0x00000244) | 1517 | #define IPW_RX_BD_SIZE 0x00000244 |
1276 | #define CX2_RFDS_TABLE_LOWER (0x00000500) | 1518 | #define IPW_RFDS_TABLE_LOWER 0x00000500 |
1277 | 1519 | ||
1278 | #define CX2_TX_CMD_QUEUE_READ_INDEX (0x00000280) | 1520 | #define IPW_TX_CMD_QUEUE_READ_INDEX 0x00000280 |
1279 | #define CX2_TX_QUEUE_0_READ_INDEX (0x00000284) | 1521 | #define IPW_TX_QUEUE_0_READ_INDEX 0x00000284 |
1280 | #define CX2_TX_QUEUE_1_READ_INDEX (0x00000288) | 1522 | #define IPW_TX_QUEUE_1_READ_INDEX 0x00000288 |
1281 | #define CX2_TX_QUEUE_2_READ_INDEX (0x0000028C) | 1523 | #define IPW_TX_QUEUE_2_READ_INDEX (0x0000028C) |
1282 | #define CX2_TX_QUEUE_3_READ_INDEX (0x00000290) | 1524 | #define IPW_TX_QUEUE_3_READ_INDEX 0x00000290 |
1283 | #define CX2_RX_READ_INDEX (0x000002A0) | 1525 | #define IPW_RX_READ_INDEX (0x000002A0) |
1284 | 1526 | ||
1285 | #define CX2_TX_CMD_QUEUE_WRITE_INDEX (0x00000F80) | 1527 | #define IPW_TX_CMD_QUEUE_WRITE_INDEX (0x00000F80) |
1286 | #define CX2_TX_QUEUE_0_WRITE_INDEX (0x00000F84) | 1528 | #define IPW_TX_QUEUE_0_WRITE_INDEX (0x00000F84) |
1287 | #define CX2_TX_QUEUE_1_WRITE_INDEX (0x00000F88) | 1529 | #define IPW_TX_QUEUE_1_WRITE_INDEX (0x00000F88) |
1288 | #define CX2_TX_QUEUE_2_WRITE_INDEX (0x00000F8C) | 1530 | #define IPW_TX_QUEUE_2_WRITE_INDEX (0x00000F8C) |
1289 | #define CX2_TX_QUEUE_3_WRITE_INDEX (0x00000F90) | 1531 | #define IPW_TX_QUEUE_3_WRITE_INDEX (0x00000F90) |
1290 | #define CX2_RX_WRITE_INDEX (0x00000FA0) | 1532 | #define IPW_RX_WRITE_INDEX (0x00000FA0) |
1291 | 1533 | ||
1292 | /* | 1534 | /* |
1293 | * EEPROM Related Definitions | 1535 | * EEPROM Related Definitions |
1294 | */ | 1536 | */ |
1295 | 1537 | ||
1296 | #define IPW_EEPROM_DATA_SRAM_ADDRESS (CX2_SHARED_LOWER_BOUND + 0x814) | 1538 | #define IPW_EEPROM_DATA_SRAM_ADDRESS (IPW_SHARED_LOWER_BOUND + 0x814) |
1297 | #define IPW_EEPROM_DATA_SRAM_SIZE (CX2_SHARED_LOWER_BOUND + 0x818) | 1539 | #define IPW_EEPROM_DATA_SRAM_SIZE (IPW_SHARED_LOWER_BOUND + 0x818) |
1298 | #define IPW_EEPROM_LOAD_DISABLE (CX2_SHARED_LOWER_BOUND + 0x81C) | 1540 | #define IPW_EEPROM_LOAD_DISABLE (IPW_SHARED_LOWER_BOUND + 0x81C) |
1299 | #define IPW_EEPROM_DATA (CX2_SHARED_LOWER_BOUND + 0x820) | 1541 | #define IPW_EEPROM_DATA (IPW_SHARED_LOWER_BOUND + 0x820) |
1300 | #define IPW_EEPROM_UPPER_ADDRESS (CX2_SHARED_LOWER_BOUND + 0x9E0) | 1542 | #define IPW_EEPROM_UPPER_ADDRESS (IPW_SHARED_LOWER_BOUND + 0x9E0) |
1301 | 1543 | ||
1302 | #define IPW_STATION_TABLE_LOWER (CX2_SHARED_LOWER_BOUND + 0xA0C) | 1544 | #define IPW_STATION_TABLE_LOWER (IPW_SHARED_LOWER_BOUND + 0xA0C) |
1303 | #define IPW_STATION_TABLE_UPPER (CX2_SHARED_LOWER_BOUND + 0xB0C) | 1545 | #define IPW_STATION_TABLE_UPPER (IPW_SHARED_LOWER_BOUND + 0xB0C) |
1304 | #define IPW_REQUEST_ATIM (CX2_SHARED_LOWER_BOUND + 0xB0C) | 1546 | #define IPW_REQUEST_ATIM (IPW_SHARED_LOWER_BOUND + 0xB0C) |
1305 | #define IPW_ATIM_SENT (CX2_SHARED_LOWER_BOUND + 0xB10) | 1547 | #define IPW_ATIM_SENT (IPW_SHARED_LOWER_BOUND + 0xB10) |
1306 | #define IPW_WHO_IS_AWAKE (CX2_SHARED_LOWER_BOUND + 0xB14) | 1548 | #define IPW_WHO_IS_AWAKE (IPW_SHARED_LOWER_BOUND + 0xB14) |
1307 | #define IPW_DURING_ATIM_WINDOW (CX2_SHARED_LOWER_BOUND + 0xB18) | 1549 | #define IPW_DURING_ATIM_WINDOW (IPW_SHARED_LOWER_BOUND + 0xB18) |
1308 | 1550 | ||
1309 | #define MSB 1 | 1551 | #define MSB 1 |
1310 | #define LSB 0 | 1552 | #define LSB 0 |
@@ -1326,15 +1568,15 @@ do { if (ipw_debug_level & (level)) \ | |||
1326 | #define EEPROM_HW_VERSION (GET_EEPROM_ADDR(0x72,LSB)) /* 2 bytes */ | 1568 | #define EEPROM_HW_VERSION (GET_EEPROM_ADDR(0x72,LSB)) /* 2 bytes */ |
1327 | 1569 | ||
1328 | /* 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*/ |
1329 | #define EEPROM_NIC_TYPE_STANDARD 0 | 1571 | #define EEPROM_NIC_TYPE_0 0 |
1330 | #define EEPROM_NIC_TYPE_DELL 1 | 1572 | #define EEPROM_NIC_TYPE_1 1 |
1331 | #define EEPROM_NIC_TYPE_FUJITSU 2 | 1573 | #define EEPROM_NIC_TYPE_2 2 |
1332 | #define EEPROM_NIC_TYPE_IBM 3 | 1574 | #define EEPROM_NIC_TYPE_3 3 |
1333 | #define EEPROM_NIC_TYPE_HP 4 | 1575 | #define EEPROM_NIC_TYPE_4 4 |
1334 | 1576 | ||
1335 | #define FW_MEM_REG_LOWER_BOUND 0x00300000 | 1577 | #define FW_MEM_REG_LOWER_BOUND 0x00300000 |
1336 | #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) |
1337 | 1579 | #define IPW_EVENT_REG (FW_MEM_REG_LOWER_BOUND + 0x04) | |
1338 | #define EEPROM_BIT_SK (1<<0) | 1580 | #define EEPROM_BIT_SK (1<<0) |
1339 | #define EEPROM_BIT_CS (1<<1) | 1581 | #define EEPROM_BIT_CS (1<<1) |
1340 | #define EEPROM_BIT_DI (1<<2) | 1582 | #define EEPROM_BIT_DI (1<<2) |
@@ -1343,50 +1585,47 @@ do { if (ipw_debug_level & (level)) \ | |||
1343 | #define EEPROM_CMD_READ 0x2 | 1585 | #define EEPROM_CMD_READ 0x2 |
1344 | 1586 | ||
1345 | /* Interrupts masks */ | 1587 | /* Interrupts masks */ |
1346 | #define CX2_INTA_NONE 0x00000000 | 1588 | #define IPW_INTA_NONE 0x00000000 |
1347 | 1589 | ||
1348 | #define CX2_INTA_BIT_RX_TRANSFER 0x00000002 | 1590 | #define IPW_INTA_BIT_RX_TRANSFER 0x00000002 |
1349 | #define CX2_INTA_BIT_STATUS_CHANGE 0x00000010 | 1591 | #define IPW_INTA_BIT_STATUS_CHANGE 0x00000010 |
1350 | #define CX2_INTA_BIT_BEACON_PERIOD_EXPIRED 0x00000020 | 1592 | #define IPW_INTA_BIT_BEACON_PERIOD_EXPIRED 0x00000020 |
1351 | 1593 | ||
1352 | //Inta Bits for CF | 1594 | //Inta Bits for CF |
1353 | #define CX2_INTA_BIT_TX_CMD_QUEUE 0x00000800 | 1595 | #define IPW_INTA_BIT_TX_CMD_QUEUE 0x00000800 |
1354 | #define CX2_INTA_BIT_TX_QUEUE_1 0x00001000 | 1596 | #define IPW_INTA_BIT_TX_QUEUE_1 0x00001000 |
1355 | #define CX2_INTA_BIT_TX_QUEUE_2 0x00002000 | 1597 | #define IPW_INTA_BIT_TX_QUEUE_2 0x00002000 |
1356 | #define CX2_INTA_BIT_TX_QUEUE_3 0x00004000 | 1598 | #define IPW_INTA_BIT_TX_QUEUE_3 0x00004000 |
1357 | #define CX2_INTA_BIT_TX_QUEUE_4 0x00008000 | 1599 | #define IPW_INTA_BIT_TX_QUEUE_4 0x00008000 |
1358 | 1600 | ||
1359 | #define CX2_INTA_BIT_SLAVE_MODE_HOST_CMD_DONE 0x00010000 | 1601 | #define IPW_INTA_BIT_SLAVE_MODE_HOST_CMD_DONE 0x00010000 |
1360 | 1602 | ||
1361 | #define CX2_INTA_BIT_PREPARE_FOR_POWER_DOWN 0x00100000 | 1603 | #define IPW_INTA_BIT_PREPARE_FOR_POWER_DOWN 0x00100000 |
1362 | #define CX2_INTA_BIT_POWER_DOWN 0x00200000 | 1604 | #define IPW_INTA_BIT_POWER_DOWN 0x00200000 |
1363 | 1605 | ||
1364 | #define CX2_INTA_BIT_FW_INITIALIZATION_DONE 0x01000000 | 1606 | #define IPW_INTA_BIT_FW_INITIALIZATION_DONE 0x01000000 |
1365 | #define CX2_INTA_BIT_FW_CARD_DISABLE_PHY_OFF_DONE 0x02000000 | 1607 | #define IPW_INTA_BIT_FW_CARD_DISABLE_PHY_OFF_DONE 0x02000000 |
1366 | #define CX2_INTA_BIT_RF_KILL_DONE 0x04000000 | 1608 | #define IPW_INTA_BIT_RF_KILL_DONE 0x04000000 |
1367 | #define CX2_INTA_BIT_FATAL_ERROR 0x40000000 | 1609 | #define IPW_INTA_BIT_FATAL_ERROR 0x40000000 |
1368 | #define CX2_INTA_BIT_PARITY_ERROR 0x80000000 | 1610 | #define IPW_INTA_BIT_PARITY_ERROR 0x80000000 |
1369 | 1611 | ||
1370 | /* Interrupts enabled at init time. */ | 1612 | /* Interrupts enabled at init time. */ |
1371 | #define CX2_INTA_MASK_ALL \ | 1613 | #define IPW_INTA_MASK_ALL \ |
1372 | (CX2_INTA_BIT_TX_QUEUE_1 | \ | 1614 | (IPW_INTA_BIT_TX_QUEUE_1 | \ |
1373 | CX2_INTA_BIT_TX_QUEUE_2 | \ | 1615 | IPW_INTA_BIT_TX_QUEUE_2 | \ |
1374 | CX2_INTA_BIT_TX_QUEUE_3 | \ | 1616 | IPW_INTA_BIT_TX_QUEUE_3 | \ |
1375 | CX2_INTA_BIT_TX_QUEUE_4 | \ | 1617 | IPW_INTA_BIT_TX_QUEUE_4 | \ |
1376 | CX2_INTA_BIT_TX_CMD_QUEUE | \ | 1618 | IPW_INTA_BIT_TX_CMD_QUEUE | \ |
1377 | CX2_INTA_BIT_RX_TRANSFER | \ | 1619 | IPW_INTA_BIT_RX_TRANSFER | \ |
1378 | CX2_INTA_BIT_FATAL_ERROR | \ | 1620 | IPW_INTA_BIT_FATAL_ERROR | \ |
1379 | CX2_INTA_BIT_PARITY_ERROR | \ | 1621 | IPW_INTA_BIT_PARITY_ERROR | \ |
1380 | CX2_INTA_BIT_STATUS_CHANGE | \ | 1622 | IPW_INTA_BIT_STATUS_CHANGE | \ |
1381 | CX2_INTA_BIT_FW_INITIALIZATION_DONE | \ | 1623 | IPW_INTA_BIT_FW_INITIALIZATION_DONE | \ |
1382 | CX2_INTA_BIT_BEACON_PERIOD_EXPIRED | \ | 1624 | IPW_INTA_BIT_BEACON_PERIOD_EXPIRED | \ |
1383 | CX2_INTA_BIT_SLAVE_MODE_HOST_CMD_DONE | \ | 1625 | IPW_INTA_BIT_SLAVE_MODE_HOST_CMD_DONE | \ |
1384 | CX2_INTA_BIT_PREPARE_FOR_POWER_DOWN | \ | 1626 | IPW_INTA_BIT_PREPARE_FOR_POWER_DOWN | \ |
1385 | CX2_INTA_BIT_POWER_DOWN | \ | 1627 | IPW_INTA_BIT_POWER_DOWN | \ |
1386 | CX2_INTA_BIT_RF_KILL_DONE ) | 1628 | IPW_INTA_BIT_RF_KILL_DONE ) |
1387 | |||
1388 | #define IPWSTATUS_ERROR_LOG (CX2_SHARED_LOWER_BOUND + 0x410) | ||
1389 | #define IPW_EVENT_LOG (CX2_SHARED_LOWER_BOUND + 0x414) | ||
1390 | 1629 | ||
1391 | /* FW event log definitions */ | 1630 | /* FW event log definitions */ |
1392 | #define EVENT_ELEM_SIZE (3 * sizeof(u32)) | 1631 | #define EVENT_ELEM_SIZE (3 * sizeof(u32)) |
@@ -1396,6 +1635,11 @@ do { if (ipw_debug_level & (level)) \ | |||
1396 | #define ERROR_ELEM_SIZE (7 * sizeof(u32)) | 1635 | #define ERROR_ELEM_SIZE (7 * sizeof(u32)) |
1397 | #define ERROR_START_OFFSET (1 * sizeof(u32)) | 1636 | #define ERROR_START_OFFSET (1 * sizeof(u32)) |
1398 | 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 | |||
1399 | enum { | 1643 | enum { |
1400 | IPW_FW_ERROR_OK = 0, | 1644 | IPW_FW_ERROR_OK = 0, |
1401 | IPW_FW_ERROR_FAIL, | 1645 | IPW_FW_ERROR_FAIL, |
@@ -1408,8 +1652,8 @@ enum { | |||
1408 | IPW_FW_ERROR_ALLOC_FAIL, | 1652 | IPW_FW_ERROR_ALLOC_FAIL, |
1409 | IPW_FW_ERROR_DMA_UNDERRUN, | 1653 | IPW_FW_ERROR_DMA_UNDERRUN, |
1410 | IPW_FW_ERROR_DMA_STATUS, | 1654 | IPW_FW_ERROR_DMA_STATUS, |
1411 | IPW_FW_ERROR_DINOSTATUS_ERROR, | 1655 | IPW_FW_ERROR_DINO_ERROR, |
1412 | IPW_FW_ERROR_EEPROMSTATUS_ERROR, | 1656 | IPW_FW_ERROR_EEPROM_ERROR, |
1413 | IPW_FW_ERROR_SYSASSERT, | 1657 | IPW_FW_ERROR_SYSASSERT, |
1414 | IPW_FW_ERROR_FATAL_ERROR | 1658 | IPW_FW_ERROR_FATAL_ERROR |
1415 | }; | 1659 | }; |
@@ -1425,6 +1669,8 @@ enum { | |||
1425 | #define HC_IBSS_RECONF 4 | 1669 | #define HC_IBSS_RECONF 4 |
1426 | #define HC_DISASSOC_QUIET 5 | 1670 | #define HC_DISASSOC_QUIET 5 |
1427 | 1671 | ||
1672 | #define HC_QOS_SUPPORT_ASSOC 0x01 | ||
1673 | |||
1428 | #define IPW_RATE_CAPABILITIES 1 | 1674 | #define IPW_RATE_CAPABILITIES 1 |
1429 | #define IPW_RATE_CONNECT 0 | 1675 | #define IPW_RATE_CONNECT 0 |
1430 | 1676 | ||
@@ -1595,18 +1841,20 @@ enum { | |||
1595 | IPW_ORD_TABLE_7_LAST | 1841 | IPW_ORD_TABLE_7_LAST |
1596 | }; | 1842 | }; |
1597 | 1843 | ||
1598 | #define IPW_ORDINALS_TABLE_LOWER (CX2_SHARED_LOWER_BOUND + 0x500) | 1844 | #define IPW_ERROR_LOG (IPW_SHARED_LOWER_BOUND + 0x410) |
1599 | #define IPW_ORDINALS_TABLE_0 (CX2_SHARED_LOWER_BOUND + 0x180) | 1845 | #define IPW_EVENT_LOG (IPW_SHARED_LOWER_BOUND + 0x414) |
1600 | #define IPW_ORDINALS_TABLE_1 (CX2_SHARED_LOWER_BOUND + 0x184) | 1846 | #define IPW_ORDINALS_TABLE_LOWER (IPW_SHARED_LOWER_BOUND + 0x500) |
1601 | #define IPW_ORDINALS_TABLE_2 (CX2_SHARED_LOWER_BOUND + 0x188) | 1847 | #define IPW_ORDINALS_TABLE_0 (IPW_SHARED_LOWER_BOUND + 0x180) |
1602 | #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) | ||
1603 | 1851 | ||
1604 | struct ipw_fixed_rate { | 1852 | struct ipw_fixed_rate { |
1605 | u16 tx_rates; | 1853 | u16 tx_rates; |
1606 | u16 reserved; | 1854 | u16 reserved; |
1607 | } __attribute__ ((packed)); | 1855 | } __attribute__ ((packed)); |
1608 | 1856 | ||
1609 | #define CX2_INDIRECT_ADDR_MASK (~0x3ul) | 1857 | #define IPW_INDIRECT_ADDR_MASK (~0x3ul) |
1610 | 1858 | ||
1611 | struct host_cmd { | 1859 | struct host_cmd { |
1612 | u8 cmd; | 1860 | u8 cmd; |
@@ -1615,6 +1863,12 @@ struct host_cmd { | |||
1615 | u32 param[TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH]; | 1863 | u32 param[TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH]; |
1616 | } __attribute__ ((packed)); | 1864 | } __attribute__ ((packed)); |
1617 | 1865 | ||
1866 | struct ipw_cmd_log { | ||
1867 | unsigned long jiffies; | ||
1868 | int retcode; | ||
1869 | struct host_cmd cmd; | ||
1870 | }; | ||
1871 | |||
1618 | #define CFG_BT_COEXISTENCE_MIN 0x00 | 1872 | #define CFG_BT_COEXISTENCE_MIN 0x00 |
1619 | #define CFG_BT_COEXISTENCE_DEFER 0x02 | 1873 | #define CFG_BT_COEXISTENCE_DEFER 0x02 |
1620 | #define CFG_BT_COEXISTENCE_KILL 0x04 | 1874 | #define CFG_BT_COEXISTENCE_KILL 0x04 |
@@ -1643,15 +1897,6 @@ struct host_cmd { | |||
1643 | #define REG_CHANNEL_MASK 0x00003FFF | 1897 | #define REG_CHANNEL_MASK 0x00003FFF |
1644 | #define IPW_IBSS_11B_DEFAULT_MASK 0x87ff | 1898 | #define IPW_IBSS_11B_DEFAULT_MASK 0x87ff |
1645 | 1899 | ||
1646 | static const long ipw_frequencies[] = { | ||
1647 | 2412, 2417, 2422, 2427, | ||
1648 | 2432, 2437, 2442, 2447, | ||
1649 | 2452, 2457, 2462, 2467, | ||
1650 | 2472, 2484 | ||
1651 | }; | ||
1652 | |||
1653 | #define FREQ_COUNT ARRAY_SIZE(ipw_frequencies) | ||
1654 | |||
1655 | #define IPW_MAX_CONFIG_RETRIES 10 | 1900 | #define IPW_MAX_CONFIG_RETRIES 10 |
1656 | 1901 | ||
1657 | static inline u32 frame_hdr_len(struct ieee80211_hdr_4addr *hdr) | 1902 | static inline u32 frame_hdr_len(struct ieee80211_hdr_4addr *hdr) |