diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-dev.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 76 |
1 files changed, 66 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 3822cf53e36..55dc5a86654 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /****************************************************************************** | 1 | /****************************************************************************** |
2 | * | 2 | * |
3 | * Copyright(c) 2003 - 2009 Intel Corporation. All rights reserved. | 3 | * Copyright(c) 2003 - 2010 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 |
@@ -512,6 +512,7 @@ struct iwl_ht_config { | |||
512 | bool is_ht; | 512 | bool is_ht; |
513 | bool is_40mhz; | 513 | bool is_40mhz; |
514 | bool single_chain_sufficient; | 514 | bool single_chain_sufficient; |
515 | enum ieee80211_smps_mode smps; /* current smps mode */ | ||
515 | /* BSS related data */ | 516 | /* BSS related data */ |
516 | u8 extension_chan_offset; | 517 | u8 extension_chan_offset; |
517 | u8 ht_protection; | 518 | u8 ht_protection; |
@@ -984,6 +985,56 @@ struct iwl_switch_rxon { | |||
984 | __le16 channel; | 985 | __le16 channel; |
985 | }; | 986 | }; |
986 | 987 | ||
988 | /* | ||
989 | * schedule the timer to wake up every UCODE_TRACE_PERIOD milliseconds | ||
990 | * to perform continuous uCode event logging operation if enabled | ||
991 | */ | ||
992 | #define UCODE_TRACE_PERIOD (100) | ||
993 | |||
994 | /* | ||
995 | * iwl_event_log: current uCode event log position | ||
996 | * | ||
997 | * @ucode_trace: enable/disable ucode continuous trace timer | ||
998 | * @num_wraps: how many times the event buffer wraps | ||
999 | * @next_entry: the entry just before the next one that uCode would fill | ||
1000 | * @non_wraps_count: counter for no wrap detected when dump ucode events | ||
1001 | * @wraps_once_count: counter for wrap once detected when dump ucode events | ||
1002 | * @wraps_more_count: counter for wrap more than once detected | ||
1003 | * when dump ucode events | ||
1004 | */ | ||
1005 | struct iwl_event_log { | ||
1006 | bool ucode_trace; | ||
1007 | u32 num_wraps; | ||
1008 | u32 next_entry; | ||
1009 | int non_wraps_count; | ||
1010 | int wraps_once_count; | ||
1011 | int wraps_more_count; | ||
1012 | }; | ||
1013 | |||
1014 | /* | ||
1015 | * host interrupt timeout value | ||
1016 | * used with setting interrupt coalescing timer | ||
1017 | * the CSR_INT_COALESCING is an 8 bit register in 32-usec unit | ||
1018 | * | ||
1019 | * default interrupt coalescing timer is 64 x 32 = 2048 usecs | ||
1020 | * default interrupt coalescing calibration timer is 16 x 32 = 512 usecs | ||
1021 | */ | ||
1022 | #define IWL_HOST_INT_TIMEOUT_MAX (0xFF) | ||
1023 | #define IWL_HOST_INT_TIMEOUT_DEF (0x40) | ||
1024 | #define IWL_HOST_INT_TIMEOUT_MIN (0x0) | ||
1025 | #define IWL_HOST_INT_CALIB_TIMEOUT_MAX (0xFF) | ||
1026 | #define IWL_HOST_INT_CALIB_TIMEOUT_DEF (0x10) | ||
1027 | #define IWL_HOST_INT_CALIB_TIMEOUT_MIN (0x0) | ||
1028 | |||
1029 | /* | ||
1030 | * This is the threshold value of plcp error rate per 100mSecs. It is | ||
1031 | * used to set and check for the validity of plcp_delta. | ||
1032 | */ | ||
1033 | #define IWL_MAX_PLCP_ERR_THRESHOLD_MIN (0) | ||
1034 | #define IWL_MAX_PLCP_ERR_THRESHOLD_DEF (50) | ||
1035 | #define IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF (100) | ||
1036 | #define IWL_MAX_PLCP_ERR_THRESHOLD_MAX (255) | ||
1037 | |||
987 | struct iwl_priv { | 1038 | struct iwl_priv { |
988 | 1039 | ||
989 | /* ieee device used by generic ieee processing code */ | 1040 | /* ieee device used by generic ieee processing code */ |
@@ -1004,13 +1055,16 @@ struct iwl_priv { | |||
1004 | 1055 | ||
1005 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; | 1056 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; |
1006 | 1057 | ||
1007 | #if defined(CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT) || defined(CONFIG_IWL3945_SPECTRUM_MEASUREMENT) | ||
1008 | /* spectrum measurement report caching */ | 1058 | /* spectrum measurement report caching */ |
1009 | struct iwl_spectrum_notification measure_report; | 1059 | struct iwl_spectrum_notification measure_report; |
1010 | u8 measurement_status; | 1060 | u8 measurement_status; |
1011 | #endif | 1061 | |
1012 | /* ucode beacon time */ | 1062 | /* ucode beacon time */ |
1013 | u32 ucode_beacon_time; | 1063 | u32 ucode_beacon_time; |
1064 | int missed_beacon_threshold; | ||
1065 | |||
1066 | /* storing the jiffies when the plcp error rate is received */ | ||
1067 | unsigned long plcp_jiffies; | ||
1014 | 1068 | ||
1015 | /* we allocate array of iwl4965_channel_info for NIC's valid channels. | 1069 | /* we allocate array of iwl4965_channel_info for NIC's valid channels. |
1016 | * Access via channel # using indirect index array */ | 1070 | * Access via channel # using indirect index array */ |
@@ -1029,14 +1083,15 @@ struct iwl_priv { | |||
1029 | struct iwl_calib_result calib_results[IWL_CALIB_MAX]; | 1083 | struct iwl_calib_result calib_results[IWL_CALIB_MAX]; |
1030 | 1084 | ||
1031 | /* Scan related variables */ | 1085 | /* Scan related variables */ |
1032 | unsigned long last_scan_jiffies; | ||
1033 | unsigned long next_scan_jiffies; | 1086 | unsigned long next_scan_jiffies; |
1034 | unsigned long scan_start; | 1087 | unsigned long scan_start; |
1035 | unsigned long scan_pass_start; | 1088 | unsigned long scan_pass_start; |
1036 | unsigned long scan_start_tsf; | 1089 | unsigned long scan_start_tsf; |
1090 | unsigned long last_internal_scan_jiffies; | ||
1037 | void *scan; | 1091 | void *scan; |
1038 | int scan_bands; | 1092 | int scan_bands; |
1039 | struct cfg80211_scan_request *scan_request; | 1093 | struct cfg80211_scan_request *scan_request; |
1094 | bool is_internal_short_scan; | ||
1040 | u8 scan_tx_ant[IEEE80211_NUM_BANDS]; | 1095 | u8 scan_tx_ant[IEEE80211_NUM_BANDS]; |
1041 | u8 mgmt_tx_ant; | 1096 | u8 mgmt_tx_ant; |
1042 | 1097 | ||
@@ -1135,6 +1190,8 @@ struct iwl_priv { | |||
1135 | struct iwl_notif_statistics statistics; | 1190 | struct iwl_notif_statistics statistics; |
1136 | #ifdef CONFIG_IWLWIFI_DEBUG | 1191 | #ifdef CONFIG_IWLWIFI_DEBUG |
1137 | struct iwl_notif_statistics accum_statistics; | 1192 | struct iwl_notif_statistics accum_statistics; |
1193 | struct iwl_notif_statistics delta_statistics; | ||
1194 | struct iwl_notif_statistics max_delta; | ||
1138 | #endif | 1195 | #endif |
1139 | 1196 | ||
1140 | /* context information */ | 1197 | /* context information */ |
@@ -1207,15 +1264,10 @@ struct iwl_priv { | |||
1207 | 1264 | ||
1208 | struct workqueue_struct *workqueue; | 1265 | struct workqueue_struct *workqueue; |
1209 | 1266 | ||
1210 | struct work_struct up; | ||
1211 | struct work_struct restart; | 1267 | struct work_struct restart; |
1212 | struct work_struct calibrated_work; | ||
1213 | struct work_struct scan_completed; | 1268 | struct work_struct scan_completed; |
1214 | struct work_struct rx_replenish; | 1269 | struct work_struct rx_replenish; |
1215 | struct work_struct abort_scan; | 1270 | struct work_struct abort_scan; |
1216 | struct work_struct update_link_led; | ||
1217 | struct work_struct auth_work; | ||
1218 | struct work_struct report_work; | ||
1219 | struct work_struct request_scan; | 1271 | struct work_struct request_scan; |
1220 | struct work_struct beacon_update; | 1272 | struct work_struct beacon_update; |
1221 | struct work_struct tt_work; | 1273 | struct work_struct tt_work; |
@@ -1251,7 +1303,8 @@ struct iwl_priv { | |||
1251 | u16 rx_traffic_idx; | 1303 | u16 rx_traffic_idx; |
1252 | u8 *tx_traffic; | 1304 | u8 *tx_traffic; |
1253 | u8 *rx_traffic; | 1305 | u8 *rx_traffic; |
1254 | struct iwl_debugfs *dbgfs; | 1306 | struct dentry *debugfs_dir; |
1307 | u32 dbgfs_sram_offset, dbgfs_sram_len; | ||
1255 | #endif /* CONFIG_IWLWIFI_DEBUGFS */ | 1308 | #endif /* CONFIG_IWLWIFI_DEBUGFS */ |
1256 | #endif /* CONFIG_IWLWIFI_DEBUG */ | 1309 | #endif /* CONFIG_IWLWIFI_DEBUG */ |
1257 | 1310 | ||
@@ -1261,6 +1314,7 @@ struct iwl_priv { | |||
1261 | u32 disable_tx_power_cal; | 1314 | u32 disable_tx_power_cal; |
1262 | struct work_struct run_time_calib_work; | 1315 | struct work_struct run_time_calib_work; |
1263 | struct timer_list statistics_periodic; | 1316 | struct timer_list statistics_periodic; |
1317 | struct timer_list ucode_trace; | ||
1264 | bool hw_ready; | 1318 | bool hw_ready; |
1265 | /*For 3945*/ | 1319 | /*For 3945*/ |
1266 | #define IWL_DEFAULT_TX_POWER 0x0F | 1320 | #define IWL_DEFAULT_TX_POWER 0x0F |
@@ -1268,6 +1322,8 @@ struct iwl_priv { | |||
1268 | struct iwl3945_notif_statistics statistics_39; | 1322 | struct iwl3945_notif_statistics statistics_39; |
1269 | 1323 | ||
1270 | u32 sta_supp_rates; | 1324 | u32 sta_supp_rates; |
1325 | |||
1326 | struct iwl_event_log event_log; | ||
1271 | }; /*iwl_priv */ | 1327 | }; /*iwl_priv */ |
1272 | 1328 | ||
1273 | static inline void iwl_txq_ctx_activate(struct iwl_priv *priv, int txq_id) | 1329 | static inline void iwl_txq_ctx_activate(struct iwl_priv *priv, int txq_id) |