wl1271: Move setting of wake-up conditions to ps.c from cmd.c
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>
Tue, 10 Aug 2010 04:38:36 +0000 (06:38 +0200)
committerLuciano Coelho <luciano.coelho@nokia.com>
Tue, 28 Sep 2010 09:15:08 +0000 (12:15 +0300)
This removes a fixme. Also, it removes a redundant setting of the wake-up
conditions when exiting power save mode, which should improve performance.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
drivers/net/wireless/wl12xx/wl1271_cmd.c
drivers/net/wireless/wl12xx/wl1271_ps.c

index a338b1c93a29b9a743b01bbba63f04c805693d6d..a516035350d5fb0a30c649db23a5b3e03df7d81b 100644 (file)
@@ -395,13 +395,6 @@ int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode, bool send)
        struct wl1271_cmd_ps_params *ps_params = NULL;
        int ret = 0;
 
-       /* FIXME: this should be in ps.c */
-       ret = wl1271_acx_wake_up_conditions(wl);
-       if (ret < 0) {
-               wl1271_error("couldn't set wake up conditions");
-               goto out;
-       }
-
        wl1271_debug(DEBUG_CMD, "cmd set ps mode");
 
        ps_params = kzalloc(sizeof(*ps_params), GFP_KERNEL);
index a5e60e0403e5ad90f2b35f6900dbfa71aafe52ea..52a60959bb9c65b1b361201296f0406de0da6b3b 100644 (file)
@@ -129,6 +129,12 @@ int wl1271_ps_set_mode(struct wl1271 *wl, enum wl1271_cmd_ps_mode mode,
        case STATION_POWER_SAVE_MODE:
                wl1271_debug(DEBUG_PSM, "entering psm");
 
+               ret = wl1271_acx_wake_up_conditions(wl);
+               if (ret < 0) {
+                       wl1271_error("couldn't set wake up conditions");
+                       return ret;
+               }
+
                ret = wl1271_cmd_ps_mode(wl, STATION_POWER_SAVE_MODE, send);
                if (ret < 0)
                        return ret;