iwlwifi: clear up AC/FIFO debug output
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-dev.h
index 9b0a5cbc20f9d5ccad13dacd01ded5532013c07d..ba404b99f4fecfd09f84fa3b84166daa23ce5e86 100644 (file)
@@ -1033,8 +1033,26 @@ struct iwl_event_log {
 #define IWL_MAX_PLCP_ERR_THRESHOLD_MIN (0)
 #define IWL_MAX_PLCP_ERR_THRESHOLD_DEF (50)
 #define IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF    (100)
+#define IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF        (200)
 #define IWL_MAX_PLCP_ERR_THRESHOLD_MAX (255)
 
+#define IWL_DELAY_NEXT_FORCE_RF_RESET  (HZ*3)
+#define IWL_DELAY_NEXT_FORCE_FW_RELOAD (HZ*5)
+
+enum iwl_reset {
+       IWL_RF_RESET = 0,
+       IWL_FW_RESET,
+       IWL_MAX_FORCE_RESET,
+};
+
+struct iwl_force_reset {
+       int reset_request_count;
+       int reset_success_count;
+       int reset_reject_count;
+       unsigned long reset_duration;
+       unsigned long last_force_reset_jiffies;
+};
+
 struct iwl_priv {
 
        /* ieee device used by generic ieee processing code */
@@ -1066,6 +1084,9 @@ struct iwl_priv {
        /* storing the jiffies when the plcp error rate is received */
        unsigned long plcp_jiffies;
 
+       /* force reset */
+       struct iwl_force_reset force_reset[IWL_MAX_FORCE_RESET];
+
        /* we allocate array of iwl4965_channel_info for NIC's valid channels.
         *    Access via channel # using indirect index array */
        struct iwl_channel_info *channel_info;  /* channel info array */
@@ -1087,7 +1108,6 @@ struct iwl_priv {
        unsigned long scan_start;
        unsigned long scan_pass_start;
        unsigned long scan_start_tsf;
-       unsigned long last_internal_scan_jiffies;
        void *scan;
        int scan_bands;
        struct cfg80211_scan_request *scan_request;
@@ -1100,6 +1120,7 @@ struct iwl_priv {
        spinlock_t hcmd_lock;   /* protect hcmd */
        spinlock_t reg_lock;    /* protect hw register access */
        struct mutex mutex;
+       struct mutex sync_cmd_mutex; /* enable serialization of sync commands */
 
        /* basic pci-network driver stuff */
        struct pci_dev *pci_dev;
@@ -1111,6 +1132,7 @@ struct iwl_priv {
        u8   rev_id;
 
        /* uCode images, save to reload in case of failure */
+       int fw_index;                   /* firmware we're trying to load */
        u32 ucode_ver;                  /* version of ucode, copy of
                                           iwl_ucode.ver */
        struct fw_desc ucode_code;      /* runtime inst */
@@ -1121,6 +1143,7 @@ struct iwl_priv {
        struct fw_desc ucode_boot;      /* bootstrap inst */
        enum ucode_type ucode_type;
        u8 ucode_write_complete;        /* the image write is complete */
+       char firmware_name[25];
 
 
        struct iwl_rxon_time_cmd rxon_timing;
@@ -1145,7 +1168,6 @@ struct iwl_priv {
        u64 led_tpt;
 
        u16 active_rate;
-       u16 active_rate_basic;
 
        u8 assoc_station_added;
        u8 start_calib;
@@ -1174,7 +1196,6 @@ struct iwl_priv {
 
        unsigned long status;
 
-       int last_rx_rssi;       /* From Rx packet statistics */
        int last_rx_noise;      /* From beacon statistics */
 
        /* counts mgmt, ctl, and data packets */
@@ -1195,8 +1216,6 @@ struct iwl_priv {
 #endif
 
        /* context information */
-       u16 rates_mask;
-
        u8 bssid[ETH_ALEN];
        u16 rts_threshold;
        u8 mac_addr[ETH_ALEN];
@@ -1221,10 +1240,6 @@ struct iwl_priv {
 
        u8 mac80211_registered;
 
-       /* Rx'd packet timing information */
-       u32 last_beacon_time;
-       u64 last_tsf;
-
        /* eeprom -- this is in the card's little endian byte order */
        u8 *eeprom;
        int    nvm_device_type;
@@ -1239,20 +1254,40 @@ struct iwl_priv {
        u16 beacon_int;
        struct ieee80211_vif *vif;
 
-       /*Added for 3945 */
-       void *shared_virt;
-       dma_addr_t shared_phys;
-       /*End*/
-       struct iwl_hw_params hw_params;
+       union {
+#if defined(CONFIG_IWL3945) || defined(CONFIG_IWL3945_MODULE)
+               struct {
+                       void *shared_virt;
+                       dma_addr_t shared_phys;
+
+                       struct delayed_work thermal_periodic;
+                       struct delayed_work rfkill_poll;
 
-       /* INT ICT Table */
-       __le32 *ict_tbl;
-       dma_addr_t ict_tbl_dma;
-       dma_addr_t aligned_ict_tbl_dma;
-       int ict_index;
-       void *ict_tbl_vir;
-       u32 inta;
-       bool use_ict;
+                       struct iwl3945_notif_statistics statistics;
+
+                       u32 sta_supp_rates;
+                       int last_rx_rssi;       /* From Rx packet statistics */
+
+                       /* Rx'd packet timing information */
+                       u32 last_beacon_time;
+                       u64 last_tsf;
+               } _3945;
+#endif
+#if defined(CONFIG_IWLAGN) || defined(CONFIG_IWLAGN_MODULE)
+               struct {
+                       /* INT ICT Table */
+                       __le32 *ict_tbl;
+                       void *ict_tbl_vir;
+                       dma_addr_t ict_tbl_dma;
+                       dma_addr_t aligned_ict_tbl_dma;
+                       int ict_index;
+                       u32 inta;
+                       bool use_ict;
+               } _agn;
+#endif
+       };
+
+       struct iwl_hw_params hw_params;
 
        u32 inta_mask;
        /* Current association information needed to configure the
@@ -1264,15 +1299,10 @@ struct iwl_priv {
 
        struct workqueue_struct *workqueue;
 
-       struct work_struct up;
        struct work_struct restart;
-       struct work_struct calibrated_work;
        struct work_struct scan_completed;
        struct work_struct rx_replenish;
        struct work_struct abort_scan;
-       struct work_struct update_link_led;
-       struct work_struct auth_work;
-       struct work_struct report_work;
        struct work_struct request_scan;
        struct work_struct beacon_update;
        struct work_struct tt_work;
@@ -1285,10 +1315,6 @@ struct iwl_priv {
        struct delayed_work alive_start;
        struct delayed_work scan_check;
 
-       /*For 3945 only*/
-       struct delayed_work thermal_periodic;
-       struct delayed_work rfkill_poll;
-
        /* TX Power */
        s8 tx_power_user_lmt;
        s8 tx_power_device_lmt;
@@ -1321,12 +1347,6 @@ struct iwl_priv {
        struct timer_list statistics_periodic;
        struct timer_list ucode_trace;
        bool hw_ready;
-       /*For 3945*/
-#define IWL_DEFAULT_TX_POWER 0x0F
-
-       struct iwl3945_notif_statistics statistics_39;
-
-       u32 sta_supp_rates;
 
        struct iwl_event_log event_log;
 }; /*iwl_priv */
This page took 0.02765 seconds and 5 git commands to generate.