iwlwifi-5000: implement initial calibration for 5000
[safe/jmp/linux-2.6] / drivers / net / wireless / iwlwifi / iwl-dev.h
index b1ff0af..291c1ec 100644 (file)
@@ -119,7 +119,6 @@ struct iwl_queue {
 
 /* One for each TFD */
 struct iwl_tx_info {
-       struct ieee80211_tx_status status;
        struct sk_buff *skb[MAX_NUM_OF_TBS];
 };
 
@@ -308,6 +307,8 @@ struct iwl_cmd_meta {
 
 } __attribute__ ((packed));
 
+#define IWL_CMD_MAX_PAYLOAD 640
+
 /**
  * struct iwl_cmd
  *
@@ -332,8 +333,9 @@ struct iwl_cmd {
                struct iwl_tx_cmd tx;
                struct iwl4965_tx_beacon_cmd tx_beacon;
                struct iwl4965_rxon_assoc_cmd rxon_assoc;
+               struct iwl_rem_sta_cmd rm_sta;
                u8 *indirect;
-               u8 payload[360];
+               u8 payload[IWL_CMD_MAX_PAYLOAD];
        } __attribute__ ((packed)) cmd;
 } __attribute__ ((packed));
 
@@ -683,17 +685,15 @@ extern u8 iwl4965_sync_station(struct iwl_priv *priv, int sta_id,
  ****************************************************************************/
 extern void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv);
 extern void iwl4965_hw_cancel_deferred_work(struct iwl_priv *priv);
-extern int iwl4965_hw_rxq_stop(struct iwl_priv *priv);
 extern int iwl4965_hw_set_hw_params(struct iwl_priv *priv);
-extern int iwl4965_hw_nic_stop_master(struct iwl_priv *priv);
-extern void iwl4965_hw_txq_ctx_stop(struct iwl_priv *priv);
-extern int iwl4965_hw_nic_reset(struct iwl_priv *priv);
+extern int iwl_rxq_stop(struct iwl_priv *priv);
+extern void iwl_txq_ctx_stop(struct iwl_priv *priv);
 extern int iwl4965_hw_get_temperature(struct iwl_priv *priv);
 extern unsigned int iwl4965_hw_get_beacon_cmd(struct iwl_priv *priv,
                                 struct iwl_frame *frame, u8 rate);
 extern void iwl4965_hw_build_tx_cmd_rate(struct iwl_priv *priv,
                                     struct iwl_cmd *cmd,
-                                    struct ieee80211_tx_control *ctrl,
+                                    struct ieee80211_tx_info *info,
                                     struct ieee80211_hdr *hdr,
                                     int sta_id, int tx_id);
 extern int iwl4965_hw_reg_send_txpower(struct iwl_priv *priv);
@@ -749,7 +749,7 @@ extern void iwl4965_update_rate_scaling(struct iwl_priv *priv, u8 mode);
 extern void iwl4965_rf_kill_ct_config(struct iwl_priv *priv);
 extern void iwl4965_hwrate_to_tx_control(struct iwl_priv *priv,
                                         u32 rate_n_flags,
-                                        struct ieee80211_tx_control *control);
+                                        struct ieee80211_tx_info *info);
 
 #ifdef CONFIG_IWL4965_HT
 extern void iwl4965_init_ht_hw_capab(const struct iwl_priv *priv,
@@ -876,6 +876,15 @@ struct statistics_general_data {
        u32 beacon_energy_c;
 };
 
+struct iwl_calib_results {
+       void *tx_iq_res;
+       void *tx_iq_perd_res;
+       void *lo_res;
+       u32 tx_iq_res_len;
+       u32 tx_iq_perd_res_len;
+       u32 lo_res_len;
+};
+
 enum ucode_type {
        UCODE_NONE = 0,
        UCODE_INIT,
@@ -983,6 +992,9 @@ struct iwl_priv {
        s32 temperature;        /* degrees Kelvin */
        s32 last_temperature;
 
+       /* init calibration results */
+       struct iwl_calib_results calib_results;
+
        /* Scan related variables */
        unsigned long last_scan_jiffies;
        unsigned long next_scan_jiffies;
@@ -1034,8 +1046,8 @@ struct iwl_priv {
 
        /* 1st responses from initialize and runtime uCode images.
         * 4965's initialize alive response contains some calibration data. */
-       struct iwl4965_init_alive_resp card_alive_init;
-       struct iwl4965_alive_resp card_alive;
+       struct iwl_init_alive_resp card_alive_init;
+       struct iwl_alive_resp card_alive;
 #ifdef CONFIG_IWLWIFI_RFKILL
        struct iwl_rfkill_mngr rfkill_mngr;
 #endif
@@ -1124,8 +1136,6 @@ struct iwl_priv {
 
        u8 mac80211_registered;
 
-       u32 notif_missed_beacons;
-
        /* Rx'd packet timing information */
        u32 last_beacon_time;
        u64 last_tsf;
@@ -1212,9 +1222,13 @@ struct iwl_priv {
 #endif /* CONFIG_IWLWIFI_DEBUG */
 
        struct work_struct txpower_work;
+#ifdef CONFIG_IWLWIFI_RUN_TIME_CALIB
+       u32 disable_sens_cal;
+       u32 disable_chain_noise_cal;
+#endif /* CONFIG_IWLWIFI_RUN_TIME_CALIB */
 #ifdef CONFIG_IWL4965_RUN_TIME_CALIB
        struct work_struct sensitivity_work;
-#endif
+#endif /* CONFIG_IWL4965_RUN_TIME_CALIB */
        struct timer_list statistics_periodic;
 }; /*iwl_priv */