diff options
Diffstat (limited to 'drivers/staging/cw1200/pm.h')
-rw-r--r-- | drivers/staging/cw1200/pm.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/staging/cw1200/pm.h b/drivers/staging/cw1200/pm.h index 841b609457f..433e5ec1139 100644 --- a/drivers/staging/cw1200/pm.h +++ b/drivers/staging/cw1200/pm.h @@ -12,12 +12,37 @@ #ifndef PM_H_INCLUDED #define PM_H_INCLUDED +#ifdef CONFIG_WAKELOCK +#include <linux/wakelock.h> +#endif + /* ******************************************************************** */ /* mac80211 API */ #ifdef CONFIG_PM -int cw1200_wow_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan); + +/* extern */ struct cw1200_common; +/* private */ struct cw1200_suspend_state; + +struct cw1200_pm_state { + struct cw1200_suspend_state *suspend_state; +#ifdef CONFIG_WAKELOCK + struct wake_lock wakelock; +#else + struct timer_list stay_awake; +#endif + spinlock_t lock; +}; + +void cw1200_pm_init(struct cw1200_pm_state *pm, + struct cw1200_common *priv); +void cw1200_pm_deinit(struct cw1200_pm_state *pm); +void cw1200_pm_stay_awake(struct cw1200_pm_state *pm, + unsigned long tmo); +int cw1200_wow_suspend(struct ieee80211_hw *hw, + struct cfg80211_wowlan *wowlan); int cw1200_wow_resume(struct ieee80211_hw *hw); + #endif /* CONFIG_PM */ #endif |