diff options
author | Mohamed Abbas <mabbas@linux.intel.com> | 2008-04-21 18:41:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-07 15:02:15 -0400 |
commit | 5da4b55f78fb2ed40926b775d4f7c791594ecbd7 (patch) | |
tree | a12ecf0d26552869151738998e88e03e65bcb7c3 /drivers/net/wireless/iwlwifi/iwl-4965.h | |
parent | 7eafd25d9559bd0f652449c222d38d63412e3d4a (diff) |
iwlwifi: Add power level support
Add power level support
Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.h | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h index 78381f287de8..0550d12e5c60 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965.h | |||
@@ -44,6 +44,7 @@ | |||
44 | #include "iwl-prph.h" | 44 | #include "iwl-prph.h" |
45 | #include "iwl-debug.h" | 45 | #include "iwl-debug.h" |
46 | #include "iwl-led.h" | 46 | #include "iwl-led.h" |
47 | #include "iwl-power.h" | ||
47 | 48 | ||
48 | /* configuration for the iwl4965 */ | 49 | /* configuration for the iwl4965 */ |
49 | extern struct iwl_cfg iwl4965_agn_cfg; | 50 | extern struct iwl_cfg iwl4965_agn_cfg; |
@@ -257,31 +258,6 @@ enum iwl_pwr_src { | |||
257 | IWL_PWR_SRC_VAUX, | 258 | IWL_PWR_SRC_VAUX, |
258 | }; | 259 | }; |
259 | 260 | ||
260 | struct iwl4965_power_vec_entry { | ||
261 | struct iwl4965_powertable_cmd cmd; | ||
262 | u8 no_dtim; | ||
263 | }; | ||
264 | #define IWL_POWER_RANGE_0 (0) | ||
265 | #define IWL_POWER_RANGE_1 (1) | ||
266 | |||
267 | #define IWL_POWER_MODE_CAM 0x00 /* Continuously Aware Mode, always on */ | ||
268 | #define IWL_POWER_INDEX_3 0x03 | ||
269 | #define IWL_POWER_INDEX_5 0x05 | ||
270 | #define IWL_POWER_AC 0x06 | ||
271 | #define IWL_POWER_BATTERY 0x07 | ||
272 | #define IWL_POWER_LIMIT 0x07 | ||
273 | #define IWL_POWER_MASK 0x0F | ||
274 | #define IWL_POWER_ENABLED 0x10 | ||
275 | #define IWL_POWER_LEVEL(x) ((x) & IWL_POWER_MASK) | ||
276 | |||
277 | struct iwl4965_power_mgr { | ||
278 | spinlock_t lock; | ||
279 | struct iwl4965_power_vec_entry pwr_range_0[IWL_POWER_AC]; | ||
280 | struct iwl4965_power_vec_entry pwr_range_1[IWL_POWER_AC]; | ||
281 | u8 active_index; | ||
282 | u32 dtim_val; | ||
283 | }; | ||
284 | |||
285 | #define IEEE80211_DATA_LEN 2304 | 261 | #define IEEE80211_DATA_LEN 2304 |
286 | #define IEEE80211_4ADDR_LEN 30 | 262 | #define IEEE80211_4ADDR_LEN 30 |
287 | #define IEEE80211_HLEN (IEEE80211_4ADDR_LEN) | 263 | #define IEEE80211_HLEN (IEEE80211_4ADDR_LEN) |
@@ -674,6 +650,7 @@ extern unsigned int iwl4965_fill_beacon_frame(struct iwl_priv *priv, | |||
674 | extern int iwl4965_rx_queue_update_write_ptr(struct iwl_priv *priv, | 650 | extern int iwl4965_rx_queue_update_write_ptr(struct iwl_priv *priv, |
675 | struct iwl4965_rx_queue *q); | 651 | struct iwl4965_rx_queue *q); |
676 | extern __le16 *ieee80211_get_qos_ctrl(struct ieee80211_hdr *hdr); | 652 | extern __le16 *ieee80211_get_qos_ctrl(struct ieee80211_hdr *hdr); |
653 | extern void iwl4965_update_chain_flags(struct iwl_priv *priv); | ||
677 | int iwl4965_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src); | 654 | int iwl4965_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src); |
678 | 655 | ||
679 | int iwl4965_init_geos(struct iwl_priv *priv); | 656 | int iwl4965_init_geos(struct iwl_priv *priv); |
@@ -1100,7 +1077,7 @@ struct iwl_priv { | |||
1100 | u64 bytes; | 1077 | u64 bytes; |
1101 | } tx_stats[3], rx_stats[3]; | 1078 | } tx_stats[3], rx_stats[3]; |
1102 | 1079 | ||
1103 | struct iwl4965_power_mgr power_data; | 1080 | struct iwl_power_mgr power_data; |
1104 | 1081 | ||
1105 | struct iwl4965_notif_statistics statistics; | 1082 | struct iwl4965_notif_statistics statistics; |
1106 | unsigned long last_statistics_time; | 1083 | unsigned long last_statistics_time; |