]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wireless/iwlwifi/iwl-power.h
iwlwifi: check IEEE80211_TX_STAT_AMPDU for agg pkt
[linux-2.6-omap-h63xx.git] / drivers / net / wireless / iwlwifi / iwl-power.h
index 7cab04f1bf4a7b0da730c2c5840cff87318494d2..18963392121e9606b258d6764491e72282d1d2e5 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
  *
- * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
+ * Copyright(c) 2007 - 2009 Intel Corporation. All rights reserved.
  *
  * Portions of this file are derived from the ipw3945 project, as well
  * as portions of the ieee80211 subsystem header files.
@@ -42,30 +42,26 @@ enum {
        IWL_POWER_INDEX_5,
        IWL_POWER_AUTO,
        IWL_POWER_MAX = IWL_POWER_AUTO,
-       IWL39_POWER_AC = IWL_POWER_AUTO, /* 0x06 */
-       IWL_POWER_AC,
-       IWL39_POWER_BATTERY = IWL_POWER_AC, /* 0x07 */
-       IWL39_POWER_LIMIT = IWL_POWER_AC,
-       IWL_POWER_BATTERY,
 };
 
 enum {
        IWL_POWER_SYS_AUTO,
        IWL_POWER_SYS_AC,
        IWL_POWER_SYS_BATTERY,
+       IWL_POWER_SYS_MAX,
 };
 
-#define IWL_POWER_LIMIT                0x08
-#define IWL_POWER_MASK         0x0F
-#define IWL_POWER_ENABLED      0x10
-
-#define IWL_POWER_RANGE_0  (0)
-#define IWL_POWER_RANGE_1  (1)
-
-#define IWL_POWER_LEVEL(x)     ((x) & IWL_POWER_MASK)
 
 /* Power management (not Tx power) structures */
 
+#define NOSLP cpu_to_le16(0), 0, 0
+#define SLP IWL_POWER_DRIVER_ALLOW_SLEEP_MSK, 0, 0
+#define SLP_TOUT(T) cpu_to_le32((T) * MSEC_TO_USEC)
+#define SLP_VEC(X0, X1, X2, X3, X4) {cpu_to_le32(X0), \
+                                    cpu_to_le32(X1), \
+                                    cpu_to_le32(X2), \
+                                    cpu_to_le32(X3), \
+                                    cpu_to_le32(X4)}
 struct iwl_power_vec_entry {
        struct iwl_powertable_cmd cmd;
        u8 no_dtim;
@@ -86,14 +82,6 @@ struct iwl_power_mgr {
        u8 power_disabled; /* flag to disable using power saving level */
 };
 
-struct iwl3945_power_mgr {
-       spinlock_t lock;
-       struct iwl_power_vec_entry pwr_range_0[IWL_POWER_AC];
-       struct iwl_power_vec_entry pwr_range_1[IWL_POWER_AC];
-       u8 active_index;
-       u32 dtim_val;
-};
-
 void iwl_setup_power_deferred_work(struct iwl_priv *priv);
 void iwl_power_cancel_timeout(struct iwl_priv *priv);
 int iwl_power_update_mode(struct iwl_priv *priv, bool force);