-
Notifications
You must be signed in to change notification settings - Fork 1
/
pm.h
62 lines (48 loc) · 1.82 KB
/
pm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* Mac80211 power management interface for ST-Ericsson CW1200 mac80211 drivers
*
* Copyright (c) 2011, ST-Ericsson
* Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef PM_H_INCLUDED
#define PM_H_INCLUDED
/* ******************************************************************** */
/* mac80211 API */
/* extern */ struct cw1200_common;
/* private */ struct cw1200_suspend_state;
struct cw1200_pm_state {
struct cw1200_suspend_state *suspend_state;
struct timer_list stay_awake;
struct platform_device *pm_dev;
spinlock_t lock; /* Protect access */
};
#if 0 /* NBS change, not included in build. */
int 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);
int cw1200_can_suspend(struct cw1200_common *priv);
#else /* NBS all pm functions as inline stubs. */
static inline int cw1200_pm_init(struct cw1200_pm_state *pm,
struct cw1200_common *priv)
{return 0;}
static inline void cw1200_pm_deinit(struct cw1200_pm_state *pm){}
static inline void cw1200_pm_stay_awake(struct cw1200_pm_state *pm,
unsigned long tmo){}
static inline int cw1200_wow_resume(struct ieee80211_hw *hw)
{return 0;}
static inline int cw1200_wow_suspend(struct ieee80211_hw *hw,
struct cfg80211_wowlan *wowlan)
{return 0;}
static inline int cw1200_can_suspend(struct cw1200_common *priv)
{return 1;}
#endif
#endif