diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-04-04 09:05:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-11 16:23:57 -0400 |
commit | 6d52563f2bc217cbdccb97068f5b6176352f01f2 (patch) | |
tree | 27fb48e360f153129fadb4dd5abdb4d91bb2e7eb /include | |
parent | da951c2417ec1020d0d00813da36f38e395994e9 (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 'include')
-rw-r--r-- | include/net/cfg80211.h | 4 | ||||
-rw-r--r-- | include/net/mac80211.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index ae3a3bb37bf2..1fd1c4acfc8e 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1344,6 +1344,9 @@ struct cfg80211_gtk_rekey_data { | |||
1344 | * be %NULL or contain the enabled Wake-on-Wireless triggers that are | 1344 | * be %NULL or contain the enabled Wake-on-Wireless triggers that are |
1345 | * configured for the device. | 1345 | * configured for the device. |
1346 | * @resume: wiphy device needs to be resumed | 1346 | * @resume: wiphy device needs to be resumed |
1347 | * @set_wakeup: Called when WoWLAN is enabled/disabled, use this callback | ||
1348 | * to call device_set_wakeup_enable() to enable/disable wakeup from | ||
1349 | * the device. | ||
1347 | * | 1350 | * |
1348 | * @add_virtual_intf: create a new virtual interface with the given name, | 1351 | * @add_virtual_intf: create a new virtual interface with the given name, |
1349 | * must set the struct wireless_dev's iftype. Beware: You must create | 1352 | * must set the struct wireless_dev's iftype. Beware: You must create |
@@ -1515,6 +1518,7 @@ struct cfg80211_gtk_rekey_data { | |||
1515 | struct cfg80211_ops { | 1518 | struct cfg80211_ops { |
1516 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); | 1519 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); |
1517 | int (*resume)(struct wiphy *wiphy); | 1520 | int (*resume)(struct wiphy *wiphy); |
1521 | void (*set_wakeup)(struct wiphy *wiphy, bool enabled); | ||
1518 | 1522 | ||
1519 | struct net_device * (*add_virtual_intf)(struct wiphy *wiphy, | 1523 | struct net_device * (*add_virtual_intf)(struct wiphy *wiphy, |
1520 | char *name, | 1524 | char *name, |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index ec4995d0c14d..838a4db1c848 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -2233,6 +2233,7 @@ struct ieee80211_ops { | |||
2233 | #ifdef CONFIG_PM | 2233 | #ifdef CONFIG_PM |
2234 | int (*suspend)(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan); | 2234 | int (*suspend)(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan); |
2235 | int (*resume)(struct ieee80211_hw *hw); | 2235 | int (*resume)(struct ieee80211_hw *hw); |
2236 | void (*set_wakeup)(struct ieee80211_hw *hw, bool enabled); | ||
2236 | #endif | 2237 | #endif |
2237 | int (*add_interface)(struct ieee80211_hw *hw, | 2238 | int (*add_interface)(struct ieee80211_hw *hw, |
2238 | struct ieee80211_vif *vif); | 2239 | struct ieee80211_vif *vif); |