aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
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/cfg.c
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/cfg.c')
-rw-r--r--net/mac80211/cfg.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index d6163b98f7b7..355735491252 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2695,6 +2695,13 @@ ieee80211_wiphy_get_channel(struct wiphy *wiphy)
2695 return local->oper_channel; 2695 return local->oper_channel;
2696} 2696}
2697 2697
2698#ifdef CONFIG_PM
2699static void ieee80211_set_wakeup(struct wiphy *wiphy, bool enabled)
2700{
2701 drv_set_wakeup(wiphy_priv(wiphy), enabled);
2702}
2703#endif
2704
2698struct cfg80211_ops mac80211_config_ops = { 2705struct cfg80211_ops mac80211_config_ops = {
2699 .add_virtual_intf = ieee80211_add_iface, 2706 .add_virtual_intf = ieee80211_add_iface,
2700 .del_virtual_intf = ieee80211_del_iface, 2707 .del_virtual_intf = ieee80211_del_iface,
@@ -2763,4 +2770,7 @@ struct cfg80211_ops mac80211_config_ops = {
2763 .probe_client = ieee80211_probe_client, 2770 .probe_client = ieee80211_probe_client,
2764 .get_channel = ieee80211_wiphy_get_channel, 2771 .get_channel = ieee80211_wiphy_get_channel,
2765 .set_noack_map = ieee80211_set_noack_map, 2772 .set_noack_map = ieee80211_set_noack_map,
2773#ifdef CONFIG_PM
2774 .set_wakeup = ieee80211_set_wakeup,
2775#endif
2766}; 2776};