Skip to content

Commit

Permalink
wl1251: move wl1251_acx_wake_up_conditions() to wl1251_ps_set_mode()
Browse files Browse the repository at this point in the history
It should not be hidden inside wl1251_cmd_ps_mode().

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Kalle Valo authored and John W. Linville committed Aug 14, 2009
1 parent fe9a984 commit 4a81892
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/net/wireless/wl12xx/wl1251_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,6 @@ int wl1251_cmd_ps_mode(struct wl1251 *wl, u8 ps_mode)
struct wl1251_cmd_ps_params *ps_params = NULL;
int ret = 0;

/* FIXME: this should be in ps.c */
ret = wl1251_acx_wake_up_conditions(wl, WAKE_UP_EVENT_DTIM_BITMAP,
wl->listen_int);
if (ret < 0) {
wl1251_error("couldn't set wake up conditions");
goto out;
}

wl1251_debug(DEBUG_CMD, "cmd set ps mode");

ps_params = kzalloc(sizeof(*ps_params), GFP_KERNEL);
Expand Down
13 changes: 13 additions & 0 deletions drivers/net/wireless/wl12xx/wl1251_ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode)
switch (mode) {
case STATION_POWER_SAVE_MODE:
wl1251_debug(DEBUG_PSM, "entering psm");

ret = wl1251_acx_wake_up_conditions(wl,
WAKE_UP_EVENT_DTIM_BITMAP,
wl->listen_int);
if (ret < 0)
return ret;

ret = wl1251_cmd_ps_mode(wl, STATION_POWER_SAVE_MODE);
if (ret < 0)
return ret;
Expand All @@ -135,6 +142,12 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode)
if (ret < 0)
return ret;

ret = wl1251_acx_wake_up_conditions(wl,
WAKE_UP_EVENT_DTIM_BITMAP,
wl->listen_int);
if (ret < 0)
return ret;

ret = wl1251_cmd_ps_mode(wl, STATION_ACTIVE_MODE);
if (ret < 0)
return ret;
Expand Down

0 comments on commit 4a81892

Please sign in to comment.