iwl3945: Remove power related definitions from 3945 code

Most of the power (not TX power, but power management) structures and
definitions are duplicated accross iwl-power.h and iwl-3945.h. We should try
to only use the iwl header.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Acked-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Samuel Ortiz
2008-12-19 10:37:14 +08:00
committed by John W. Linville
parent b5b83239e7
commit 1125eff3ae
3 changed files with 30 additions and 39 deletions

View File

@@ -42,7 +42,10 @@ 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,
};
@@ -56,6 +59,11 @@ enum {
#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 */
struct iwl_power_vec_entry {
@@ -78,6 +86,14 @@ 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);