diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/wireless/iwlwifi/iwl-commands.h | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-commands.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-commands.h | 363 |
1 files changed, 329 insertions, 34 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index 4afaf773aeac..f4e59ae07f8e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * GPL LICENSE SUMMARY | 6 | * GPL LICENSE SUMMARY |
7 | * | 7 | * |
8 | * Copyright(c) 2005 - 2009 Intel Corporation. All rights reserved. | 8 | * Copyright(c) 2005 - 2010 Intel Corporation. All rights reserved. |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of version 2 of the GNU General Public License as | 11 | * it under the terms of version 2 of the GNU General Public License as |
@@ -30,7 +30,7 @@ | |||
30 | * | 30 | * |
31 | * BSD LICENSE | 31 | * BSD LICENSE |
32 | * | 32 | * |
33 | * Copyright(c) 2005 - 2009 Intel Corporation. All rights reserved. | 33 | * Copyright(c) 2005 - 2010 Intel Corporation. All rights reserved. |
34 | * All rights reserved. | 34 | * All rights reserved. |
35 | * | 35 | * |
36 | * Redistribution and use in source and binary forms, with or without | 36 | * Redistribution and use in source and binary forms, with or without |
@@ -109,17 +109,17 @@ enum { | |||
109 | REPLY_TX_LINK_QUALITY_CMD = 0x4e, /* 4965 only */ | 109 | REPLY_TX_LINK_QUALITY_CMD = 0x4e, /* 4965 only */ |
110 | 110 | ||
111 | /* WiMAX coexistence */ | 111 | /* WiMAX coexistence */ |
112 | COEX_PRIORITY_TABLE_CMD = 0x5a, /*5000 only */ | 112 | COEX_PRIORITY_TABLE_CMD = 0x5a, /* for 5000 series and up */ |
113 | COEX_MEDIUM_NOTIFICATION = 0x5b, | 113 | COEX_MEDIUM_NOTIFICATION = 0x5b, |
114 | COEX_EVENT_CMD = 0x5c, | 114 | COEX_EVENT_CMD = 0x5c, |
115 | 115 | ||
116 | /* Calibration */ | 116 | /* Calibration */ |
117 | TEMPERATURE_NOTIFICATION = 0x62, | ||
117 | CALIBRATION_CFG_CMD = 0x65, | 118 | CALIBRATION_CFG_CMD = 0x65, |
118 | CALIBRATION_RES_NOTIFICATION = 0x66, | 119 | CALIBRATION_RES_NOTIFICATION = 0x66, |
119 | CALIBRATION_COMPLETE_NOTIFICATION = 0x67, | 120 | CALIBRATION_COMPLETE_NOTIFICATION = 0x67, |
120 | 121 | ||
121 | /* 802.11h related */ | 122 | /* 802.11h related */ |
122 | RADAR_NOTIFICATION = 0x70, /* not used */ | ||
123 | REPLY_QUIET_CMD = 0x71, /* not used */ | 123 | REPLY_QUIET_CMD = 0x71, /* not used */ |
124 | REPLY_CHANNEL_SWITCH = 0x72, | 124 | REPLY_CHANNEL_SWITCH = 0x72, |
125 | CHANNEL_SWITCH_NOTIFICATION = 0x73, | 125 | CHANNEL_SWITCH_NOTIFICATION = 0x73, |
@@ -148,7 +148,7 @@ enum { | |||
148 | QUIET_NOTIFICATION = 0x96, /* not used */ | 148 | QUIET_NOTIFICATION = 0x96, /* not used */ |
149 | REPLY_TX_PWR_TABLE_CMD = 0x97, | 149 | REPLY_TX_PWR_TABLE_CMD = 0x97, |
150 | REPLY_TX_POWER_DBM_CMD_V1 = 0x98, /* old version of API */ | 150 | REPLY_TX_POWER_DBM_CMD_V1 = 0x98, /* old version of API */ |
151 | TX_ANT_CONFIGURATION_CMD = 0x98, /* not used */ | 151 | TX_ANT_CONFIGURATION_CMD = 0x98, |
152 | MEASURE_ABORT_NOTIFICATION = 0x99, /* not used */ | 152 | MEASURE_ABORT_NOTIFICATION = 0x99, /* not used */ |
153 | 153 | ||
154 | /* Bluetooth device coexistence config command */ | 154 | /* Bluetooth device coexistence config command */ |
@@ -353,6 +353,9 @@ struct iwl3945_power_per_rate { | |||
353 | #define POWER_TABLE_NUM_HT_OFDM_ENTRIES 32 | 353 | #define POWER_TABLE_NUM_HT_OFDM_ENTRIES 32 |
354 | #define POWER_TABLE_CCK_ENTRY 32 | 354 | #define POWER_TABLE_CCK_ENTRY 32 |
355 | 355 | ||
356 | #define IWL_PWR_NUM_HT_OFDM_ENTRIES 24 | ||
357 | #define IWL_PWR_CCK_ENTRIES 2 | ||
358 | |||
356 | /** | 359 | /** |
357 | * union iwl4965_tx_power_dual_stream | 360 | * union iwl4965_tx_power_dual_stream |
358 | * | 361 | * |
@@ -411,6 +414,16 @@ struct iwl5000_tx_power_dbm_cmd { | |||
411 | u8 reserved; | 414 | u8 reserved; |
412 | } __attribute__ ((packed)); | 415 | } __attribute__ ((packed)); |
413 | 416 | ||
417 | /** | ||
418 | * Command TX_ANT_CONFIGURATION_CMD = 0x98 | ||
419 | * This command is used to configure valid Tx antenna. | ||
420 | * By default uCode concludes the valid antenna according to the radio flavor. | ||
421 | * This command enables the driver to override/modify this conclusion. | ||
422 | */ | ||
423 | struct iwl_tx_ant_config_cmd { | ||
424 | __le32 valid; | ||
425 | } __attribute__ ((packed)); | ||
426 | |||
414 | /****************************************************************************** | 427 | /****************************************************************************** |
415 | * (0a) | 428 | * (0a) |
416 | * Alive and Error Commands & Responses: | 429 | * Alive and Error Commands & Responses: |
@@ -793,7 +806,7 @@ struct iwl3945_channel_switch_cmd { | |||
793 | struct iwl3945_power_per_rate power[IWL_MAX_RATES]; | 806 | struct iwl3945_power_per_rate power[IWL_MAX_RATES]; |
794 | } __attribute__ ((packed)); | 807 | } __attribute__ ((packed)); |
795 | 808 | ||
796 | struct iwl_channel_switch_cmd { | 809 | struct iwl4965_channel_switch_cmd { |
797 | u8 band; | 810 | u8 band; |
798 | u8 expect_beacon; | 811 | u8 expect_beacon; |
799 | __le16 channel; | 812 | __le16 channel; |
@@ -803,6 +816,48 @@ struct iwl_channel_switch_cmd { | |||
803 | struct iwl4965_tx_power_db tx_power; | 816 | struct iwl4965_tx_power_db tx_power; |
804 | } __attribute__ ((packed)); | 817 | } __attribute__ ((packed)); |
805 | 818 | ||
819 | /** | ||
820 | * struct iwl5000_channel_switch_cmd | ||
821 | * @band: 0- 5.2GHz, 1- 2.4GHz | ||
822 | * @expect_beacon: 0- resume transmits after channel switch | ||
823 | * 1- wait for beacon to resume transmits | ||
824 | * @channel: new channel number | ||
825 | * @rxon_flags: Rx on flags | ||
826 | * @rxon_filter_flags: filtering parameters | ||
827 | * @switch_time: switch time in extended beacon format | ||
828 | * @reserved: reserved bytes | ||
829 | */ | ||
830 | struct iwl5000_channel_switch_cmd { | ||
831 | u8 band; | ||
832 | u8 expect_beacon; | ||
833 | __le16 channel; | ||
834 | __le32 rxon_flags; | ||
835 | __le32 rxon_filter_flags; | ||
836 | __le32 switch_time; | ||
837 | __le32 reserved[2][IWL_PWR_NUM_HT_OFDM_ENTRIES + IWL_PWR_CCK_ENTRIES]; | ||
838 | } __attribute__ ((packed)); | ||
839 | |||
840 | /** | ||
841 | * struct iwl6000_channel_switch_cmd | ||
842 | * @band: 0- 5.2GHz, 1- 2.4GHz | ||
843 | * @expect_beacon: 0- resume transmits after channel switch | ||
844 | * 1- wait for beacon to resume transmits | ||
845 | * @channel: new channel number | ||
846 | * @rxon_flags: Rx on flags | ||
847 | * @rxon_filter_flags: filtering parameters | ||
848 | * @switch_time: switch time in extended beacon format | ||
849 | * @reserved: reserved bytes | ||
850 | */ | ||
851 | struct iwl6000_channel_switch_cmd { | ||
852 | u8 band; | ||
853 | u8 expect_beacon; | ||
854 | __le16 channel; | ||
855 | __le32 rxon_flags; | ||
856 | __le32 rxon_filter_flags; | ||
857 | __le32 switch_time; | ||
858 | __le32 reserved[3][IWL_PWR_NUM_HT_OFDM_ENTRIES + IWL_PWR_CCK_ENTRIES]; | ||
859 | } __attribute__ ((packed)); | ||
860 | |||
806 | /* | 861 | /* |
807 | * CHANNEL_SWITCH_NOTIFICATION = 0x73 (notification only, not a command) | 862 | * CHANNEL_SWITCH_NOTIFICATION = 0x73 (notification only, not a command) |
808 | */ | 863 | */ |
@@ -921,6 +976,7 @@ struct iwl_qosparam_cmd { | |||
921 | #define STA_MODIFY_TX_RATE_MSK 0x04 | 976 | #define STA_MODIFY_TX_RATE_MSK 0x04 |
922 | #define STA_MODIFY_ADDBA_TID_MSK 0x08 | 977 | #define STA_MODIFY_ADDBA_TID_MSK 0x08 |
923 | #define STA_MODIFY_DELBA_TID_MSK 0x10 | 978 | #define STA_MODIFY_DELBA_TID_MSK 0x10 |
979 | #define STA_MODIFY_SLEEP_TX_COUNT_MSK 0x20 | ||
924 | 980 | ||
925 | /* Receiver address (actually, Rx station's index into station table), | 981 | /* Receiver address (actually, Rx station's index into station table), |
926 | * combined with Traffic ID (QOS priority), in format used by Tx Scheduler */ | 982 | * combined with Traffic ID (QOS priority), in format used by Tx Scheduler */ |
@@ -1051,7 +1107,14 @@ struct iwl4965_addsta_cmd { | |||
1051 | * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */ | 1107 | * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */ |
1052 | __le16 add_immediate_ba_ssn; | 1108 | __le16 add_immediate_ba_ssn; |
1053 | 1109 | ||
1054 | __le32 reserved2; | 1110 | /* |
1111 | * Number of packets OK to transmit to station even though | ||
1112 | * it is asleep -- used to synchronise PS-poll and u-APSD | ||
1113 | * responses while ucode keeps track of STA sleep state. | ||
1114 | */ | ||
1115 | __le16 sleep_tx_count; | ||
1116 | |||
1117 | __le16 reserved2; | ||
1055 | } __attribute__ ((packed)); | 1118 | } __attribute__ ((packed)); |
1056 | 1119 | ||
1057 | /* 5000 */ | 1120 | /* 5000 */ |
@@ -1082,7 +1145,14 @@ struct iwl_addsta_cmd { | |||
1082 | * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */ | 1145 | * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */ |
1083 | __le16 add_immediate_ba_ssn; | 1146 | __le16 add_immediate_ba_ssn; |
1084 | 1147 | ||
1085 | __le32 reserved2; | 1148 | /* |
1149 | * Number of packets OK to transmit to station even though | ||
1150 | * it is asleep -- used to synchronise PS-poll and u-APSD | ||
1151 | * responses while ucode keeps track of STA sleep state. | ||
1152 | */ | ||
1153 | __le16 sleep_tx_count; | ||
1154 | |||
1155 | __le16 reserved2; | ||
1086 | } __attribute__ ((packed)); | 1156 | } __attribute__ ((packed)); |
1087 | 1157 | ||
1088 | 1158 | ||
@@ -1634,6 +1704,21 @@ enum { | |||
1634 | TX_ABORT_REQUIRED_MSK = 0x80000000, /* bits 31:31 */ | 1704 | TX_ABORT_REQUIRED_MSK = 0x80000000, /* bits 31:31 */ |
1635 | }; | 1705 | }; |
1636 | 1706 | ||
1707 | static inline u32 iwl_tx_status_to_mac80211(u32 status) | ||
1708 | { | ||
1709 | status &= TX_STATUS_MSK; | ||
1710 | |||
1711 | switch (status) { | ||
1712 | case TX_STATUS_SUCCESS: | ||
1713 | case TX_STATUS_DIRECT_DONE: | ||
1714 | return IEEE80211_TX_STAT_ACK; | ||
1715 | case TX_STATUS_FAIL_DEST_PS: | ||
1716 | return IEEE80211_TX_STAT_TX_FILTERED; | ||
1717 | default: | ||
1718 | return 0; | ||
1719 | } | ||
1720 | } | ||
1721 | |||
1637 | static inline bool iwl_is_tx_success(u32 status) | 1722 | static inline bool iwl_is_tx_success(u32 status) |
1638 | { | 1723 | { |
1639 | status &= TX_STATUS_MSK; | 1724 | status &= TX_STATUS_MSK; |
@@ -2163,6 +2248,31 @@ struct iwl_link_quality_cmd { | |||
2163 | } __attribute__ ((packed)); | 2248 | } __attribute__ ((packed)); |
2164 | 2249 | ||
2165 | /* | 2250 | /* |
2251 | * BT configuration enable flags: | ||
2252 | * bit 0 - 1: BT channel announcement enabled | ||
2253 | * 0: disable | ||
2254 | * bit 1 - 1: priority of BT device enabled | ||
2255 | * 0: disable | ||
2256 | * bit 2 - 1: BT 2 wire support enabled | ||
2257 | * 0: disable | ||
2258 | */ | ||
2259 | #define BT_COEX_DISABLE (0x0) | ||
2260 | #define BT_ENABLE_CHANNEL_ANNOUNCE BIT(0) | ||
2261 | #define BT_ENABLE_PRIORITY BIT(1) | ||
2262 | #define BT_ENABLE_2_WIRE BIT(2) | ||
2263 | |||
2264 | #define BT_COEX_DISABLE (0x0) | ||
2265 | #define BT_COEX_ENABLE (BT_ENABLE_CHANNEL_ANNOUNCE | BT_ENABLE_PRIORITY) | ||
2266 | |||
2267 | #define BT_LEAD_TIME_MIN (0x0) | ||
2268 | #define BT_LEAD_TIME_DEF (0x1E) | ||
2269 | #define BT_LEAD_TIME_MAX (0xFF) | ||
2270 | |||
2271 | #define BT_MAX_KILL_MIN (0x1) | ||
2272 | #define BT_MAX_KILL_DEF (0x5) | ||
2273 | #define BT_MAX_KILL_MAX (0xFF) | ||
2274 | |||
2275 | /* | ||
2166 | * REPLY_BT_CONFIG = 0x9b (command, has simple generic response) | 2276 | * REPLY_BT_CONFIG = 0x9b (command, has simple generic response) |
2167 | * | 2277 | * |
2168 | * 3945 and 4965 support hardware handshake with Bluetooth device on | 2278 | * 3945 and 4965 support hardware handshake with Bluetooth device on |
@@ -2411,7 +2521,7 @@ struct iwl_card_state_notif { | |||
2411 | 2521 | ||
2412 | #define HW_CARD_DISABLED 0x01 | 2522 | #define HW_CARD_DISABLED 0x01 |
2413 | #define SW_CARD_DISABLED 0x02 | 2523 | #define SW_CARD_DISABLED 0x02 |
2414 | #define RF_CARD_DISABLED 0x04 | 2524 | #define CT_CARD_DISABLED 0x04 |
2415 | #define RXON_CARD_DISABLED 0x10 | 2525 | #define RXON_CARD_DISABLED 0x10 |
2416 | 2526 | ||
2417 | struct iwl_ct_kill_config { | 2527 | struct iwl_ct_kill_config { |
@@ -2497,9 +2607,10 @@ struct iwl_scan_channel { | |||
2497 | /** | 2607 | /** |
2498 | * struct iwl_ssid_ie - directed scan network information element | 2608 | * struct iwl_ssid_ie - directed scan network information element |
2499 | * | 2609 | * |
2500 | * Up to 4 of these may appear in REPLY_SCAN_CMD, selected by "type" field | 2610 | * Up to 20 of these may appear in REPLY_SCAN_CMD (Note: Only 4 are in |
2501 | * in struct iwl_scan_channel; each channel may select different ssids from | 2611 | * 3945 SCAN api), selected by "type" bit field in struct iwl_scan_channel; |
2502 | * among the 4 entries. SSID IEs get transmitted in reverse order of entry. | 2612 | * each channel may select different ssids from among the 20 (4) entries. |
2613 | * SSID IEs get transmitted in reverse order of entry. | ||
2503 | */ | 2614 | */ |
2504 | struct iwl_ssid_ie { | 2615 | struct iwl_ssid_ie { |
2505 | u8 id; | 2616 | u8 id; |
@@ -2510,8 +2621,11 @@ struct iwl_ssid_ie { | |||
2510 | #define PROBE_OPTION_MAX_3945 4 | 2621 | #define PROBE_OPTION_MAX_3945 4 |
2511 | #define PROBE_OPTION_MAX 20 | 2622 | #define PROBE_OPTION_MAX 20 |
2512 | #define TX_CMD_LIFE_TIME_INFINITE cpu_to_le32(0xFFFFFFFF) | 2623 | #define TX_CMD_LIFE_TIME_INFINITE cpu_to_le32(0xFFFFFFFF) |
2513 | #define IWL_GOOD_CRC_TH cpu_to_le16(1) | 2624 | #define IWL_GOOD_CRC_TH_DISABLED 0 |
2625 | #define IWL_GOOD_CRC_TH_DEFAULT cpu_to_le16(1) | ||
2626 | #define IWL_GOOD_CRC_TH_NEVER cpu_to_le16(0xffff) | ||
2514 | #define IWL_MAX_SCAN_SIZE 1024 | 2627 | #define IWL_MAX_SCAN_SIZE 1024 |
2628 | #define IWL_MAX_CMD_SIZE 4096 | ||
2515 | #define IWL_MAX_PROBE_REQUEST 200 | 2629 | #define IWL_MAX_PROBE_REQUEST 200 |
2516 | 2630 | ||
2517 | /* | 2631 | /* |
@@ -2884,7 +2998,7 @@ struct statistics_rx_ht_phy { | |||
2884 | __le32 agg_crc32_good; | 2998 | __le32 agg_crc32_good; |
2885 | __le32 agg_mpdu_cnt; | 2999 | __le32 agg_mpdu_cnt; |
2886 | __le32 agg_cnt; | 3000 | __le32 agg_cnt; |
2887 | __le32 reserved2; | 3001 | __le32 unsupport_mcs; |
2888 | } __attribute__ ((packed)); | 3002 | } __attribute__ ((packed)); |
2889 | 3003 | ||
2890 | #define INTERFERENCE_DATA_AVAILABLE cpu_to_le32(1) | 3004 | #define INTERFERENCE_DATA_AVAILABLE cpu_to_le32(1) |
@@ -2987,8 +3101,8 @@ struct statistics_div { | |||
2987 | } __attribute__ ((packed)); | 3101 | } __attribute__ ((packed)); |
2988 | 3102 | ||
2989 | struct statistics_general { | 3103 | struct statistics_general { |
2990 | __le32 temperature; | 3104 | __le32 temperature; /* radio temperature */ |
2991 | __le32 temperature_m; | 3105 | __le32 temperature_m; /* for 5000 and up, this is radio voltage */ |
2992 | struct statistics_dbg dbg; | 3106 | struct statistics_dbg dbg; |
2993 | __le32 sleep_time; | 3107 | __le32 sleep_time; |
2994 | __le32 slots_out; | 3108 | __le32 slots_out; |
@@ -2996,11 +3110,20 @@ struct statistics_general { | |||
2996 | __le32 ttl_timestamp; | 3110 | __le32 ttl_timestamp; |
2997 | struct statistics_div div; | 3111 | struct statistics_div div; |
2998 | __le32 rx_enable_counter; | 3112 | __le32 rx_enable_counter; |
2999 | __le32 reserved1; | 3113 | /* |
3114 | * num_of_sos_states: | ||
3115 | * count the number of times we have to re-tune | ||
3116 | * in order to get out of bad PHY status | ||
3117 | */ | ||
3118 | __le32 num_of_sos_states; | ||
3000 | __le32 reserved2; | 3119 | __le32 reserved2; |
3001 | __le32 reserved3; | 3120 | __le32 reserved3; |
3002 | } __attribute__ ((packed)); | 3121 | } __attribute__ ((packed)); |
3003 | 3122 | ||
3123 | #define UCODE_STATISTICS_CLEAR_MSK (0x1 << 0) | ||
3124 | #define UCODE_STATISTICS_FREQUENCY_MSK (0x1 << 1) | ||
3125 | #define UCODE_STATISTICS_NARROW_BAND_MSK (0x1 << 2) | ||
3126 | |||
3004 | /* | 3127 | /* |
3005 | * REPLY_STATISTICS_CMD = 0x9c, | 3128 | * REPLY_STATISTICS_CMD = 0x9c, |
3006 | * 3945 and 4965 identical. | 3129 | * 3945 and 4965 identical. |
@@ -3057,13 +3180,30 @@ struct iwl_notif_statistics { | |||
3057 | 3180 | ||
3058 | /* | 3181 | /* |
3059 | * MISSED_BEACONS_NOTIFICATION = 0xa2 (notification only, not a command) | 3182 | * MISSED_BEACONS_NOTIFICATION = 0xa2 (notification only, not a command) |
3183 | * | ||
3184 | * uCode send MISSED_BEACONS_NOTIFICATION to driver when detect beacon missed | ||
3185 | * in regardless of how many missed beacons, which mean when driver receive the | ||
3186 | * notification, inside the command, it can find all the beacons information | ||
3187 | * which include number of total missed beacons, number of consecutive missed | ||
3188 | * beacons, number of beacons received and number of beacons expected to | ||
3189 | * receive. | ||
3190 | * | ||
3191 | * If uCode detected consecutive_missed_beacons > 5, it will reset the radio | ||
3192 | * in order to bring the radio/PHY back to working state; which has no relation | ||
3193 | * to when driver will perform sensitivity calibration. | ||
3194 | * | ||
3195 | * Driver should set it own missed_beacon_threshold to decide when to perform | ||
3196 | * sensitivity calibration based on number of consecutive missed beacons in | ||
3197 | * order to improve overall performance, especially in noisy environment. | ||
3198 | * | ||
3060 | */ | 3199 | */ |
3061 | /* if ucode missed CONSECUTIVE_MISSED_BCONS_TH beacons in a row, | 3200 | |
3062 | * then this notification will be sent. */ | 3201 | #define IWL_MISSED_BEACON_THRESHOLD_MIN (1) |
3063 | #define CONSECUTIVE_MISSED_BCONS_TH 20 | 3202 | #define IWL_MISSED_BEACON_THRESHOLD_DEF (5) |
3203 | #define IWL_MISSED_BEACON_THRESHOLD_MAX IWL_MISSED_BEACON_THRESHOLD_DEF | ||
3064 | 3204 | ||
3065 | struct iwl_missed_beacon_notif { | 3205 | struct iwl_missed_beacon_notif { |
3066 | __le32 consequtive_missed_beacons; | 3206 | __le32 consecutive_missed_beacons; |
3067 | __le32 total_missed_becons; | 3207 | __le32 total_missed_becons; |
3068 | __le32 num_expected_beacons; | 3208 | __le32 num_expected_beacons; |
3069 | __le32 num_recvd_beacons; | 3209 | __le32 num_recvd_beacons; |
@@ -3237,12 +3377,6 @@ struct iwl_missed_beacon_notif { | |||
3237 | * Lower values mean higher energy; this means making sure that the value | 3377 | * Lower values mean higher energy; this means making sure that the value |
3238 | * in HD_MIN_ENERGY_CCK_DET_INDEX is at or *above* "Max cck energy". | 3378 | * in HD_MIN_ENERGY_CCK_DET_INDEX is at or *above* "Max cck energy". |
3239 | * | 3379 | * |
3240 | * Driver should set the following entries to fixed values: | ||
3241 | * | ||
3242 | * HD_MIN_ENERGY_OFDM_DET_INDEX 100 | ||
3243 | * HD_BARKER_CORR_TH_ADD_MIN_INDEX 190 | ||
3244 | * HD_BARKER_CORR_TH_ADD_MIN_MRC_INDEX 390 | ||
3245 | * HD_OFDM_ENERGY_TH_IN_INDEX 62 | ||
3246 | */ | 3380 | */ |
3247 | 3381 | ||
3248 | /* | 3382 | /* |
@@ -3339,11 +3473,7 @@ enum { | |||
3339 | IWL_PHY_CALIBRATE_DIFF_GAIN_CMD = 7, | 3473 | IWL_PHY_CALIBRATE_DIFF_GAIN_CMD = 7, |
3340 | IWL_PHY_CALIBRATE_DC_CMD = 8, | 3474 | IWL_PHY_CALIBRATE_DC_CMD = 8, |
3341 | IWL_PHY_CALIBRATE_LO_CMD = 9, | 3475 | IWL_PHY_CALIBRATE_LO_CMD = 9, |
3342 | IWL_PHY_CALIBRATE_RX_BB_CMD = 10, | ||
3343 | IWL_PHY_CALIBRATE_TX_IQ_CMD = 11, | 3476 | IWL_PHY_CALIBRATE_TX_IQ_CMD = 11, |
3344 | IWL_PHY_CALIBRATE_RX_IQ_CMD = 12, | ||
3345 | IWL_PHY_CALIBRATION_NOISE_CMD = 13, | ||
3346 | IWL_PHY_CALIBRATE_AGC_TABLE_CMD = 14, | ||
3347 | IWL_PHY_CALIBRATE_CRYSTAL_FRQ_CMD = 15, | 3477 | IWL_PHY_CALIBRATE_CRYSTAL_FRQ_CMD = 15, |
3348 | IWL_PHY_CALIBRATE_BASE_BAND_CMD = 16, | 3478 | IWL_PHY_CALIBRATE_BASE_BAND_CMD = 16, |
3349 | IWL_PHY_CALIBRATE_TX_IQ_PERD_CMD = 17, | 3479 | IWL_PHY_CALIBRATE_TX_IQ_PERD_CMD = 17, |
@@ -3440,30 +3570,134 @@ struct iwl_led_cmd { | |||
3440 | } __attribute__ ((packed)); | 3570 | } __attribute__ ((packed)); |
3441 | 3571 | ||
3442 | /* | 3572 | /* |
3443 | * Coexistence WIFI/WIMAX Command | 3573 | * station priority table entries |
3444 | * COEX_PRIORITY_TABLE_CMD = 0x5a | 3574 | * also used as potential "events" value for both |
3445 | * | 3575 | * COEX_MEDIUM_NOTIFICATION and COEX_EVENT_CMD |
3576 | */ | ||
3577 | |||
3578 | /* | ||
3579 | * COEX events entry flag masks | ||
3580 | * RP - Requested Priority | ||
3581 | * WP - Win Medium Priority: priority assigned when the contention has been won | ||
3582 | */ | ||
3583 | #define COEX_EVT_FLAG_MEDIUM_FREE_NTFY_FLG (0x1) | ||
3584 | #define COEX_EVT_FLAG_MEDIUM_ACTV_NTFY_FLG (0x2) | ||
3585 | #define COEX_EVT_FLAG_DELAY_MEDIUM_FREE_NTFY_FLG (0x4) | ||
3586 | |||
3587 | #define COEX_CU_UNASSOC_IDLE_RP 4 | ||
3588 | #define COEX_CU_UNASSOC_MANUAL_SCAN_RP 4 | ||
3589 | #define COEX_CU_UNASSOC_AUTO_SCAN_RP 4 | ||
3590 | #define COEX_CU_CALIBRATION_RP 4 | ||
3591 | #define COEX_CU_PERIODIC_CALIBRATION_RP 4 | ||
3592 | #define COEX_CU_CONNECTION_ESTAB_RP 4 | ||
3593 | #define COEX_CU_ASSOCIATED_IDLE_RP 4 | ||
3594 | #define COEX_CU_ASSOC_MANUAL_SCAN_RP 4 | ||
3595 | #define COEX_CU_ASSOC_AUTO_SCAN_RP 4 | ||
3596 | #define COEX_CU_ASSOC_ACTIVE_LEVEL_RP 4 | ||
3597 | #define COEX_CU_RF_ON_RP 6 | ||
3598 | #define COEX_CU_RF_OFF_RP 4 | ||
3599 | #define COEX_CU_STAND_ALONE_DEBUG_RP 6 | ||
3600 | #define COEX_CU_IPAN_ASSOC_LEVEL_RP 4 | ||
3601 | #define COEX_CU_RSRVD1_RP 4 | ||
3602 | #define COEX_CU_RSRVD2_RP 4 | ||
3603 | |||
3604 | #define COEX_CU_UNASSOC_IDLE_WP 3 | ||
3605 | #define COEX_CU_UNASSOC_MANUAL_SCAN_WP 3 | ||
3606 | #define COEX_CU_UNASSOC_AUTO_SCAN_WP 3 | ||
3607 | #define COEX_CU_CALIBRATION_WP 3 | ||
3608 | #define COEX_CU_PERIODIC_CALIBRATION_WP 3 | ||
3609 | #define COEX_CU_CONNECTION_ESTAB_WP 3 | ||
3610 | #define COEX_CU_ASSOCIATED_IDLE_WP 3 | ||
3611 | #define COEX_CU_ASSOC_MANUAL_SCAN_WP 3 | ||
3612 | #define COEX_CU_ASSOC_AUTO_SCAN_WP 3 | ||
3613 | #define COEX_CU_ASSOC_ACTIVE_LEVEL_WP 3 | ||
3614 | #define COEX_CU_RF_ON_WP 3 | ||
3615 | #define COEX_CU_RF_OFF_WP 3 | ||
3616 | #define COEX_CU_STAND_ALONE_DEBUG_WP 6 | ||
3617 | #define COEX_CU_IPAN_ASSOC_LEVEL_WP 3 | ||
3618 | #define COEX_CU_RSRVD1_WP 3 | ||
3619 | #define COEX_CU_RSRVD2_WP 3 | ||
3620 | |||
3621 | #define COEX_UNASSOC_IDLE_FLAGS 0 | ||
3622 | #define COEX_UNASSOC_MANUAL_SCAN_FLAGS \ | ||
3623 | (COEX_EVT_FLAG_MEDIUM_FREE_NTFY_FLG | \ | ||
3624 | COEX_EVT_FLAG_MEDIUM_ACTV_NTFY_FLG) | ||
3625 | #define COEX_UNASSOC_AUTO_SCAN_FLAGS \ | ||
3626 | (COEX_EVT_FLAG_MEDIUM_FREE_NTFY_FLG | \ | ||
3627 | COEX_EVT_FLAG_MEDIUM_ACTV_NTFY_FLG) | ||
3628 | #define COEX_CALIBRATION_FLAGS \ | ||
3629 | (COEX_EVT_FLAG_MEDIUM_FREE_NTFY_FLG | \ | ||
3630 | COEX_EVT_FLAG_MEDIUM_ACTV_NTFY_FLG) | ||
3631 | #define COEX_PERIODIC_CALIBRATION_FLAGS 0 | ||
3632 | /* | ||
3633 | * COEX_CONNECTION_ESTAB: | ||
3634 | * we need DELAY_MEDIUM_FREE_NTFY to let WiMAX disconnect from network. | ||
3635 | */ | ||
3636 | #define COEX_CONNECTION_ESTAB_FLAGS \ | ||
3637 | (COEX_EVT_FLAG_MEDIUM_FREE_NTFY_FLG | \ | ||
3638 | COEX_EVT_FLAG_MEDIUM_ACTV_NTFY_FLG | \ | ||
3639 | COEX_EVT_FLAG_DELAY_MEDIUM_FREE_NTFY_FLG) | ||
3640 | #define COEX_ASSOCIATED_IDLE_FLAGS 0 | ||
3641 | #define COEX_ASSOC_MANUAL_SCAN_FLAGS \ | ||
3642 | (COEX_EVT_FLAG_MEDIUM_FREE_NTFY_FLG | \ | ||
3643 | COEX_EVT_FLAG_MEDIUM_ACTV_NTFY_FLG) | ||
3644 | #define COEX_ASSOC_AUTO_SCAN_FLAGS \ | ||
3645 | (COEX_EVT_FLAG_MEDIUM_FREE_NTFY_FLG | \ | ||
3646 | COEX_EVT_FLAG_MEDIUM_ACTV_NTFY_FLG) | ||
3647 | #define COEX_ASSOC_ACTIVE_LEVEL_FLAGS 0 | ||
3648 | #define COEX_RF_ON_FLAGS 0 | ||
3649 | #define COEX_RF_OFF_FLAGS 0 | ||
3650 | #define COEX_STAND_ALONE_DEBUG_FLAGS \ | ||
3651 | (COEX_EVT_FLAG_MEDIUM_FREE_NTFY_FLG | \ | ||
3652 | COEX_EVT_FLAG_MEDIUM_ACTV_NTFY_FLG) | ||
3653 | #define COEX_IPAN_ASSOC_LEVEL_FLAGS \ | ||
3654 | (COEX_EVT_FLAG_MEDIUM_FREE_NTFY_FLG | \ | ||
3655 | COEX_EVT_FLAG_MEDIUM_ACTV_NTFY_FLG | \ | ||
3656 | COEX_EVT_FLAG_DELAY_MEDIUM_FREE_NTFY_FLG) | ||
3657 | #define COEX_RSRVD1_FLAGS 0 | ||
3658 | #define COEX_RSRVD2_FLAGS 0 | ||
3659 | /* | ||
3660 | * COEX_CU_RF_ON is the event wrapping all radio ownership. | ||
3661 | * We need DELAY_MEDIUM_FREE_NTFY to let WiMAX disconnect from network. | ||
3446 | */ | 3662 | */ |
3663 | #define COEX_CU_RF_ON_FLAGS \ | ||
3664 | (COEX_EVT_FLAG_MEDIUM_FREE_NTFY_FLG | \ | ||
3665 | COEX_EVT_FLAG_MEDIUM_ACTV_NTFY_FLG | \ | ||
3666 | COEX_EVT_FLAG_DELAY_MEDIUM_FREE_NTFY_FLG) | ||
3667 | |||
3668 | |||
3447 | enum { | 3669 | enum { |
3670 | /* un-association part */ | ||
3448 | COEX_UNASSOC_IDLE = 0, | 3671 | COEX_UNASSOC_IDLE = 0, |
3449 | COEX_UNASSOC_MANUAL_SCAN = 1, | 3672 | COEX_UNASSOC_MANUAL_SCAN = 1, |
3450 | COEX_UNASSOC_AUTO_SCAN = 2, | 3673 | COEX_UNASSOC_AUTO_SCAN = 2, |
3674 | /* calibration */ | ||
3451 | COEX_CALIBRATION = 3, | 3675 | COEX_CALIBRATION = 3, |
3452 | COEX_PERIODIC_CALIBRATION = 4, | 3676 | COEX_PERIODIC_CALIBRATION = 4, |
3677 | /* connection */ | ||
3453 | COEX_CONNECTION_ESTAB = 5, | 3678 | COEX_CONNECTION_ESTAB = 5, |
3679 | /* association part */ | ||
3454 | COEX_ASSOCIATED_IDLE = 6, | 3680 | COEX_ASSOCIATED_IDLE = 6, |
3455 | COEX_ASSOC_MANUAL_SCAN = 7, | 3681 | COEX_ASSOC_MANUAL_SCAN = 7, |
3456 | COEX_ASSOC_AUTO_SCAN = 8, | 3682 | COEX_ASSOC_AUTO_SCAN = 8, |
3457 | COEX_ASSOC_ACTIVE_LEVEL = 9, | 3683 | COEX_ASSOC_ACTIVE_LEVEL = 9, |
3684 | /* RF ON/OFF */ | ||
3458 | COEX_RF_ON = 10, | 3685 | COEX_RF_ON = 10, |
3459 | COEX_RF_OFF = 11, | 3686 | COEX_RF_OFF = 11, |
3460 | COEX_STAND_ALONE_DEBUG = 12, | 3687 | COEX_STAND_ALONE_DEBUG = 12, |
3688 | /* IPAN */ | ||
3461 | COEX_IPAN_ASSOC_LEVEL = 13, | 3689 | COEX_IPAN_ASSOC_LEVEL = 13, |
3690 | /* reserved */ | ||
3462 | COEX_RSRVD1 = 14, | 3691 | COEX_RSRVD1 = 14, |
3463 | COEX_RSRVD2 = 15, | 3692 | COEX_RSRVD2 = 15, |
3464 | COEX_NUM_OF_EVENTS = 16 | 3693 | COEX_NUM_OF_EVENTS = 16 |
3465 | }; | 3694 | }; |
3466 | 3695 | ||
3696 | /* | ||
3697 | * Coexistence WIFI/WIMAX Command | ||
3698 | * COEX_PRIORITY_TABLE_CMD = 0x5a | ||
3699 | * | ||
3700 | */ | ||
3467 | struct iwl_wimax_coex_event_entry { | 3701 | struct iwl_wimax_coex_event_entry { |
3468 | u8 request_prio; | 3702 | u8 request_prio; |
3469 | u8 win_medium_prio; | 3703 | u8 win_medium_prio; |
@@ -3488,6 +3722,55 @@ struct iwl_wimax_coex_cmd { | |||
3488 | struct iwl_wimax_coex_event_entry sta_prio[COEX_NUM_OF_EVENTS]; | 3722 | struct iwl_wimax_coex_event_entry sta_prio[COEX_NUM_OF_EVENTS]; |
3489 | } __attribute__ ((packed)); | 3723 | } __attribute__ ((packed)); |
3490 | 3724 | ||
3725 | /* | ||
3726 | * Coexistence MEDIUM NOTIFICATION | ||
3727 | * COEX_MEDIUM_NOTIFICATION = 0x5b | ||
3728 | * | ||
3729 | * notification from uCode to host to indicate medium changes | ||
3730 | * | ||
3731 | */ | ||
3732 | /* | ||
3733 | * status field | ||
3734 | * bit 0 - 2: medium status | ||
3735 | * bit 3: medium change indication | ||
3736 | * bit 4 - 31: reserved | ||
3737 | */ | ||
3738 | /* status option values, (0 - 2 bits) */ | ||
3739 | #define COEX_MEDIUM_BUSY (0x0) /* radio belongs to WiMAX */ | ||
3740 | #define COEX_MEDIUM_ACTIVE (0x1) /* radio belongs to WiFi */ | ||
3741 | #define COEX_MEDIUM_PRE_RELEASE (0x2) /* received radio release */ | ||
3742 | #define COEX_MEDIUM_MSK (0x7) | ||
3743 | |||
3744 | /* send notification status (1 bit) */ | ||
3745 | #define COEX_MEDIUM_CHANGED (0x8) | ||
3746 | #define COEX_MEDIUM_CHANGED_MSK (0x8) | ||
3747 | #define COEX_MEDIUM_SHIFT (3) | ||
3748 | |||
3749 | struct iwl_coex_medium_notification { | ||
3750 | __le32 status; | ||
3751 | __le32 events; | ||
3752 | } __attribute__ ((packed)); | ||
3753 | |||
3754 | /* | ||
3755 | * Coexistence EVENT Command | ||
3756 | * COEX_EVENT_CMD = 0x5c | ||
3757 | * | ||
3758 | * send from host to uCode for coex event request. | ||
3759 | */ | ||
3760 | /* flags options */ | ||
3761 | #define COEX_EVENT_REQUEST_MSK (0x1) | ||
3762 | |||
3763 | struct iwl_coex_event_cmd { | ||
3764 | u8 flags; | ||
3765 | u8 event; | ||
3766 | __le16 reserved; | ||
3767 | } __attribute__ ((packed)); | ||
3768 | |||
3769 | struct iwl_coex_event_resp { | ||
3770 | __le32 status; | ||
3771 | } __attribute__ ((packed)); | ||
3772 | |||
3773 | |||
3491 | /****************************************************************************** | 3774 | /****************************************************************************** |
3492 | * (13) | 3775 | * (13) |
3493 | * Union of all expected notifications/responses: | 3776 | * Union of all expected notifications/responses: |
@@ -3495,6 +3778,16 @@ struct iwl_wimax_coex_cmd { | |||
3495 | *****************************************************************************/ | 3778 | *****************************************************************************/ |
3496 | 3779 | ||
3497 | struct iwl_rx_packet { | 3780 | struct iwl_rx_packet { |
3781 | /* | ||
3782 | * The first 4 bytes of the RX frame header contain both the RX frame | ||
3783 | * size and some flags. | ||
3784 | * Bit fields: | ||
3785 | * 31: flag flush RB request | ||
3786 | * 30: flag ignore TC (terminal counter) request | ||
3787 | * 29: flag fast IRQ request | ||
3788 | * 28-14: Reserved | ||
3789 | * 13-00: RX frame size | ||
3790 | */ | ||
3498 | __le32 len_n_flags; | 3791 | __le32 len_n_flags; |
3499 | struct iwl_cmd_header hdr; | 3792 | struct iwl_cmd_header hdr; |
3500 | union { | 3793 | union { |
@@ -3514,6 +3807,8 @@ struct iwl_rx_packet { | |||
3514 | struct iwl_notif_statistics stats; | 3807 | struct iwl_notif_statistics stats; |
3515 | struct iwl_compressed_ba_resp compressed_ba; | 3808 | struct iwl_compressed_ba_resp compressed_ba; |
3516 | struct iwl_missed_beacon_notif missed_beacon; | 3809 | struct iwl_missed_beacon_notif missed_beacon; |
3810 | struct iwl_coex_medium_notification coex_medium_notif; | ||
3811 | struct iwl_coex_event_resp coex_event; | ||
3517 | __le32 status; | 3812 | __le32 status; |
3518 | u8 raw[0]; | 3813 | u8 raw[0]; |
3519 | } u; | 3814 | } u; |