iwlwifi: Tune radio to prevent unexpected behavior
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-dev.h
index 70f0e79c8e4a8226bd0e4b834af5c4a592db0789..a1f3ecb69ed0cf3d9527904e3a337e52fca5b9b3 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
  *
- * Copyright(c) 2003 - 2009 Intel Corporation. All rights reserved.
+ * Copyright(c) 2003 - 2010 Intel Corporation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -1011,6 +1011,30 @@ struct iwl_event_log {
        int wraps_more_count;
 };
 
+/*
+ * host interrupt timeout value
+ * used with setting interrupt coalescing timer
+ * the CSR_INT_COALESCING is an 8 bit register in 32-usec unit
+ *
+ * default interrupt coalescing timer is 64 x 32 = 2048 usecs
+ * default interrupt coalescing calibration timer is 16 x 32 = 512 usecs
+ */
+#define IWL_HOST_INT_TIMEOUT_MAX       (0xFF)
+#define IWL_HOST_INT_TIMEOUT_DEF       (0x40)
+#define IWL_HOST_INT_TIMEOUT_MIN       (0x0)
+#define IWL_HOST_INT_CALIB_TIMEOUT_MAX (0xFF)
+#define IWL_HOST_INT_CALIB_TIMEOUT_DEF (0x10)
+#define IWL_HOST_INT_CALIB_TIMEOUT_MIN (0x0)
+
+/*
+ * This is the threshold value of plcp error rate per 100mSecs.  It is
+ * used to set and check for the validity of plcp_delta.
+ */
+#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_THRESHOLD_MAX (255)
+
 struct iwl_priv {
 
        /* ieee device used by generic ieee processing code */
@@ -1038,6 +1062,10 @@ struct iwl_priv {
 #endif
        /* ucode beacon time */
        u32 ucode_beacon_time;
+       int missed_beacon_threshold;
+
+       /* storing the jiffies when the plcp error rate is received */
+       unsigned long plcp_jiffies;
 
        /* we allocate array of iwl4965_channel_info for NIC's valid channels.
         *    Access via channel # using indirect index array */
@@ -1056,14 +1084,15 @@ struct iwl_priv {
        struct iwl_calib_result calib_results[IWL_CALIB_MAX];
 
        /* Scan related variables */
-       unsigned long last_scan_jiffies;
        unsigned long next_scan_jiffies;
        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;
+       bool is_internal_short_scan;
        u8 scan_tx_ant[IEEE80211_NUM_BANDS];
        u8 mgmt_tx_ant;
 
@@ -1162,6 +1191,8 @@ struct iwl_priv {
        struct iwl_notif_statistics statistics;
 #ifdef CONFIG_IWLWIFI_DEBUG
        struct iwl_notif_statistics accum_statistics;
+       struct iwl_notif_statistics delta_statistics;
+       struct iwl_notif_statistics max_delta;
 #endif
 
        /* context information */
This page took 0.028961 seconds and 5 git commands to generate.