wl12xx: declare suspend/resume callbacks (for wowlan)
authorEliad Peller <eliad@wizery.com>
Fri, 13 May 2011 08:57:09 +0000 (11:57 +0300)
committerLuciano Coelho <coelho@ti.com>
Fri, 13 May 2011 11:55:48 +0000 (14:55 +0300)
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>
drivers/net/wireless/wl12xx/main.c
drivers/net/wireless/wl12xx/wl12xx.h

index a14a035aa440bfc96988785bcdf80089e0b37562..4b421d801873396037596f7c89d72b1849e6e26b 100644 (file)
@@ -1350,6 +1350,23 @@ static struct notifier_block wl1271_dev_notifier = {
        .notifier_call = wl1271_dev_notify,
 };
 
+static int wl1271_op_suspend(struct ieee80211_hw *hw,
+                           struct cfg80211_wowlan *wow)
+{
+       struct wl1271 *wl = hw->priv;
+       wl1271_debug(DEBUG_MAC80211, "mac80211 suspend wow=%d", !!wow);
+       wl->wow_enabled = !!wow;
+       return 0;
+}
+
+static int wl1271_op_resume(struct ieee80211_hw *hw)
+{
+       struct wl1271 *wl = hw->priv;
+       wl1271_debug(DEBUG_MAC80211, "mac80211 resume wow=%d",
+                    wl->wow_enabled);
+       return 0;
+}
+
 static int wl1271_op_start(struct ieee80211_hw *hw)
 {
        wl1271_debug(DEBUG_MAC80211, "mac80211 start");
@@ -3506,6 +3523,8 @@ static const struct ieee80211_ops wl1271_ops = {
        .stop = wl1271_op_stop,
        .add_interface = wl1271_op_add_interface,
        .remove_interface = wl1271_op_remove_interface,
+       .suspend = wl1271_op_suspend,
+       .resume = wl1271_op_resume,
        .config = wl1271_op_config,
        .prepare_multicast = wl1271_op_prepare_multicast,
        .configure_filter = wl1271_op_configure_filter,
index ab0c2f155b8c8c68c2f3ae96fedec74c7055f0b9..9629e90d9b55e84c2863850cde714ba94f1aec9e 100644 (file)
@@ -564,6 +564,12 @@ struct wl1271 {
 
        int tcxo_clock;
 
+       /*
+        * wowlan trigger was configured during suspend.
+        * (currently, only "ANY" trigger is supported)
+        */
+       bool wow_enabled;
+
        /*
         * AP-mode - links indexed by HLID. The global and broadcast links
         * are always active.