diff options
author | Bob Copeland <me@bobcopeland.com> | 2009-01-19 11:20:53 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:00:52 -0500 |
commit | 665af4fc8979734d8f73c9a6732be07e545ce4cc (patch) | |
tree | e6efab304166f0f4f30b75906930def19b1a3fb8 /net/mac80211/cfg.c | |
parent | 0378b3f1c49d48ed524eabda7e4340163d9483c9 (diff) |
mac80211: add suspend/resume callbacks
This patch introduces suspend and resume callbacks to mac80211,
allowing mac80211 to quiesce its state (bringing down interfaces,
removing keys, etc) in preparation for suspend. cfg80211 will call
the suspend hook before the device suspend, and resume hook after
the device resume.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index d1ac3ab2c515..3527de22cafb 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1256,6 +1256,21 @@ static int ieee80211_set_mgmt_extra_ie(struct wiphy *wiphy, | |||
1256 | return ret; | 1256 | return ret; |
1257 | } | 1257 | } |
1258 | 1258 | ||
1259 | #ifdef CONFIG_PM | ||
1260 | static int ieee80211_suspend(struct wiphy *wiphy) | ||
1261 | { | ||
1262 | return __ieee80211_suspend(wiphy_priv(wiphy)); | ||
1263 | } | ||
1264 | |||
1265 | static int ieee80211_resume(struct wiphy *wiphy) | ||
1266 | { | ||
1267 | return __ieee80211_resume(wiphy_priv(wiphy)); | ||
1268 | } | ||
1269 | #else | ||
1270 | #define ieee80211_suspend NULL | ||
1271 | #define ieee80211_resume NULL | ||
1272 | #endif | ||
1273 | |||
1259 | struct cfg80211_ops mac80211_config_ops = { | 1274 | struct cfg80211_ops mac80211_config_ops = { |
1260 | .add_virtual_intf = ieee80211_add_iface, | 1275 | .add_virtual_intf = ieee80211_add_iface, |
1261 | .del_virtual_intf = ieee80211_del_iface, | 1276 | .del_virtual_intf = ieee80211_del_iface, |
@@ -1286,4 +1301,6 @@ struct cfg80211_ops mac80211_config_ops = { | |||
1286 | .set_txq_params = ieee80211_set_txq_params, | 1301 | .set_txq_params = ieee80211_set_txq_params, |
1287 | .set_channel = ieee80211_set_channel, | 1302 | .set_channel = ieee80211_set_channel, |
1288 | .set_mgmt_extra_ie = ieee80211_set_mgmt_extra_ie, | 1303 | .set_mgmt_extra_ie = ieee80211_set_mgmt_extra_ie, |
1304 | .suspend = ieee80211_suspend, | ||
1305 | .resume = ieee80211_resume, | ||
1289 | }; | 1306 | }; |