1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Mac80211 power management interface for ST-Ericsson CW1200 mac80211 drivers
5 * Copyright (c) 2011, ST-Ericsson
6 * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
12 /* ******************************************************************** */
15 /* extern */ struct cw1200_common;
16 /* private */ struct cw1200_suspend_state;
18 struct cw1200_pm_state {
19 struct cw1200_suspend_state *suspend_state;
20 struct timer_list stay_awake;
21 struct platform_device *pm_dev;
22 spinlock_t lock; /* Protect access */
26 int cw1200_pm_init(struct cw1200_pm_state *pm,
27 struct cw1200_common *priv);
28 void cw1200_pm_deinit(struct cw1200_pm_state *pm);
29 int cw1200_wow_suspend(struct ieee80211_hw *hw,
30 struct cfg80211_wowlan *wowlan);
31 int cw1200_can_suspend(struct cw1200_common *priv);
32 int cw1200_wow_resume(struct ieee80211_hw *hw);
33 void cw1200_pm_stay_awake(struct cw1200_pm_state *pm,
36 static inline void cw1200_pm_stay_awake(struct cw1200_pm_state *pm,
40 static inline int cw1200_can_suspend(struct cw1200_common *priv)