diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2009-08-07 06:34:56 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-14 09:13:41 -0400 |
commit | 4a8189227fc4718a767ffca74d13a7d552e42189 (patch) | |
tree | 3d9a110ac6b8cb1f522cbf6038ed23c6ef969665 /drivers/net/wireless/wl12xx | |
parent | fe9a98460b6c8dac47d0e34bcb04850193d41565 (diff) |
wl1251: move wl1251_acx_wake_up_conditions() to wl1251_ps_set_mode()
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>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_cmd.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_ps.c | 13 |
2 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_cmd.c b/drivers/net/wireless/wl12xx/wl1251_cmd.c index d7800a39f7d4..74ea1fdf9bd5 100644 --- a/drivers/net/wireless/wl12xx/wl1251_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1251_cmd.c | |||
@@ -301,14 +301,6 @@ int wl1251_cmd_ps_mode(struct wl1251 *wl, u8 ps_mode) | |||
301 | struct wl1251_cmd_ps_params *ps_params = NULL; | 301 | struct wl1251_cmd_ps_params *ps_params = NULL; |
302 | int ret = 0; | 302 | int ret = 0; |
303 | 303 | ||
304 | /* FIXME: this should be in ps.c */ | ||
305 | ret = wl1251_acx_wake_up_conditions(wl, WAKE_UP_EVENT_DTIM_BITMAP, | ||
306 | wl->listen_int); | ||
307 | if (ret < 0) { | ||
308 | wl1251_error("couldn't set wake up conditions"); | ||
309 | goto out; | ||
310 | } | ||
311 | |||
312 | wl1251_debug(DEBUG_CMD, "cmd set ps mode"); | 304 | wl1251_debug(DEBUG_CMD, "cmd set ps mode"); |
313 | 305 | ||
314 | ps_params = kzalloc(sizeof(*ps_params), GFP_KERNEL); | 306 | ps_params = kzalloc(sizeof(*ps_params), GFP_KERNEL); |
diff --git a/drivers/net/wireless/wl12xx/wl1251_ps.c b/drivers/net/wireless/wl12xx/wl1251_ps.c index 05816778f3db..36acde0b3bd1 100644 --- a/drivers/net/wireless/wl12xx/wl1251_ps.c +++ b/drivers/net/wireless/wl12xx/wl1251_ps.c | |||
@@ -118,6 +118,13 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode) | |||
118 | switch (mode) { | 118 | switch (mode) { |
119 | case STATION_POWER_SAVE_MODE: | 119 | case STATION_POWER_SAVE_MODE: |
120 | wl1251_debug(DEBUG_PSM, "entering psm"); | 120 | wl1251_debug(DEBUG_PSM, "entering psm"); |
121 | |||
122 | ret = wl1251_acx_wake_up_conditions(wl, | ||
123 | WAKE_UP_EVENT_DTIM_BITMAP, | ||
124 | wl->listen_int); | ||
125 | if (ret < 0) | ||
126 | return ret; | ||
127 | |||
121 | ret = wl1251_cmd_ps_mode(wl, STATION_POWER_SAVE_MODE); | 128 | ret = wl1251_cmd_ps_mode(wl, STATION_POWER_SAVE_MODE); |
122 | if (ret < 0) | 129 | if (ret < 0) |
123 | return ret; | 130 | return ret; |
@@ -135,6 +142,12 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode) | |||
135 | if (ret < 0) | 142 | if (ret < 0) |
136 | return ret; | 143 | return ret; |
137 | 144 | ||
145 | ret = wl1251_acx_wake_up_conditions(wl, | ||
146 | WAKE_UP_EVENT_DTIM_BITMAP, | ||
147 | wl->listen_int); | ||
148 | if (ret < 0) | ||
149 | return ret; | ||
150 | |||
138 | ret = wl1251_cmd_ps_mode(wl, STATION_ACTIVE_MODE); | 151 | ret = wl1251_cmd_ps_mode(wl, STATION_ACTIVE_MODE); |
139 | if (ret < 0) | 152 | if (ret < 0) |
140 | return ret; | 153 | return ret; |