root/drivers/net/wireless/st/cw1200/pm.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. cw1200_pm_stay_awake
  2. cw1200_can_suspend

   1 /* SPDX-License-Identifier: GPL-2.0-only */
   2 /*
   3  * Mac80211 power management interface for ST-Ericsson CW1200 mac80211 drivers
   4  *
   5  * Copyright (c) 2011, ST-Ericsson
   6  * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
   7  */
   8 
   9 #ifndef PM_H_INCLUDED
  10 #define PM_H_INCLUDED
  11 
  12 /* ******************************************************************** */
  13 /* mac80211 API                                                         */
  14 
  15 /* extern */  struct cw1200_common;
  16 /* private */ struct cw1200_suspend_state;
  17 
  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 */
  23 };
  24 
  25 #ifdef CONFIG_PM
  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,
  34                           unsigned long tmo);
  35 #else
  36 static inline void cw1200_pm_stay_awake(struct cw1200_pm_state *pm,
  37                                         unsigned long tmo)
  38 {
  39 }
  40 static inline int cw1200_can_suspend(struct cw1200_common *priv)
  41 {
  42         return 0;
  43 }
  44 #endif
  45 #endif

/* [<][>][^][v][top][bottom][index][help] */