aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/driver-ops.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-04-04 09:05:25 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-11 16:23:57 -0400
commit6d52563f2bc217cbdccb97068f5b6176352f01f2 (patch)
tree27fb48e360f153129fadb4dd5abdb4d91bb2e7eb /net/mac80211/driver-ops.h
parentda951c2417ec1020d0d00813da36f38e395994e9 (diff)
cfg80211/mac80211: enable proper device_set_wakeup_enable handling
In WoWLAN, we only get the triggers when we actually get to suspend. As a consequence, drivers currently don't know that the device should enable wakeup. However, the device_set_wakeup_enable() API is intended to be called when the wakeup is enabled, not later when needed. Add a new set_wakeup() call to cfg80211 and mac80211 to allow drivers to properly call device_set_wakeup_enable. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r--net/mac80211/driver-ops.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 492c08c27c5f..4a0e559cb26b 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -91,6 +91,19 @@ static inline int drv_resume(struct ieee80211_local *local)
91 trace_drv_return_int(local, ret); 91 trace_drv_return_int(local, ret);
92 return ret; 92 return ret;
93} 93}
94
95static inline void drv_set_wakeup(struct ieee80211_local *local,
96 bool enabled)
97{
98 might_sleep();
99
100 if (!local->ops->set_wakeup)
101 return;
102
103 trace_drv_set_wakeup(local, enabled);
104 local->ops->set_wakeup(&local->hw, enabled);
105 trace_drv_return_void(local);
106}
94#endif 107#endif
95 108
96static inline int drv_add_interface(struct ieee80211_local *local, 109static inline int drv_add_interface(struct ieee80211_local *local,