diff options
author | Eliad Peller <eliad@wizery.com> | 2011-05-13 04:57:09 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-05-13 07:55:48 -0400 |
commit | 402e48616078c1e56f55a69d314b77f1d750d6ad (patch) | |
tree | df404bb97ab682882bf1d30c257bb6abcd4f9cdf | |
parent | 2c0f24636c80aa09990c507c0cede39add4b4724 (diff) |
wl12xx: declare suspend/resume callbacks (for wowlan)
Additionally, add wow_enabled field to wl, to indicate
whether wowlan was configured.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl12xx.h | 6 |
2 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index a14a035aa44..4b421d80187 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -1350,6 +1350,23 @@ static struct notifier_block wl1271_dev_notifier = { | |||
1350 | .notifier_call = wl1271_dev_notify, | 1350 | .notifier_call = wl1271_dev_notify, |
1351 | }; | 1351 | }; |
1352 | 1352 | ||
1353 | static int wl1271_op_suspend(struct ieee80211_hw *hw, | ||
1354 | struct cfg80211_wowlan *wow) | ||
1355 | { | ||
1356 | struct wl1271 *wl = hw->priv; | ||
1357 | wl1271_debug(DEBUG_MAC80211, "mac80211 suspend wow=%d", !!wow); | ||
1358 | wl->wow_enabled = !!wow; | ||
1359 | return 0; | ||
1360 | } | ||
1361 | |||
1362 | static int wl1271_op_resume(struct ieee80211_hw *hw) | ||
1363 | { | ||
1364 | struct wl1271 *wl = hw->priv; | ||
1365 | wl1271_debug(DEBUG_MAC80211, "mac80211 resume wow=%d", | ||
1366 | wl->wow_enabled); | ||
1367 | return 0; | ||
1368 | } | ||
1369 | |||
1353 | static int wl1271_op_start(struct ieee80211_hw *hw) | 1370 | static int wl1271_op_start(struct ieee80211_hw *hw) |
1354 | { | 1371 | { |
1355 | wl1271_debug(DEBUG_MAC80211, "mac80211 start"); | 1372 | wl1271_debug(DEBUG_MAC80211, "mac80211 start"); |
@@ -3506,6 +3523,8 @@ static const struct ieee80211_ops wl1271_ops = { | |||
3506 | .stop = wl1271_op_stop, | 3523 | .stop = wl1271_op_stop, |
3507 | .add_interface = wl1271_op_add_interface, | 3524 | .add_interface = wl1271_op_add_interface, |
3508 | .remove_interface = wl1271_op_remove_interface, | 3525 | .remove_interface = wl1271_op_remove_interface, |
3526 | .suspend = wl1271_op_suspend, | ||
3527 | .resume = wl1271_op_resume, | ||
3509 | .config = wl1271_op_config, | 3528 | .config = wl1271_op_config, |
3510 | .prepare_multicast = wl1271_op_prepare_multicast, | 3529 | .prepare_multicast = wl1271_op_prepare_multicast, |
3511 | .configure_filter = wl1271_op_configure_filter, | 3530 | .configure_filter = wl1271_op_configure_filter, |
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h index ab0c2f155b8..9629e90d9b5 100644 --- a/drivers/net/wireless/wl12xx/wl12xx.h +++ b/drivers/net/wireless/wl12xx/wl12xx.h | |||
@@ -565,6 +565,12 @@ struct wl1271 { | |||
565 | int tcxo_clock; | 565 | int tcxo_clock; |
566 | 566 | ||
567 | /* | 567 | /* |
568 | * wowlan trigger was configured during suspend. | ||
569 | * (currently, only "ANY" trigger is supported) | ||
570 | */ | ||
571 | bool wow_enabled; | ||
572 | |||
573 | /* | ||
568 | * AP-mode - links indexed by HLID. The global and broadcast links | 574 | * AP-mode - links indexed by HLID. The global and broadcast links |
569 | * are always active. | 575 | * are always active. |
570 | */ | 576 | */ |