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