Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a818922 authored by Kalle Valo's avatar Kalle Valo Committed by John W. Linville
Browse files

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: default avatarKalle Valo <kalle.valo@nokia.com>
Reviewed-by: default avatarVidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent fe9a9846
Loading
Loading
Loading
Loading
+0 −8
Original line number Original line Diff line number Diff line
@@ -301,14 +301,6 @@ int wl1251_cmd_ps_mode(struct wl1251 *wl, u8 ps_mode)
	struct wl1251_cmd_ps_params *ps_params = NULL;
	struct wl1251_cmd_ps_params *ps_params = NULL;
	int ret = 0;
	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");
	wl1251_debug(DEBUG_CMD, "cmd set ps mode");


	ps_params = kzalloc(sizeof(*ps_params), GFP_KERNEL);
	ps_params = kzalloc(sizeof(*ps_params), GFP_KERNEL);
+13 −0
Original line number Original line Diff line number Diff line
@@ -118,6 +118,13 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode)
	switch (mode) {
	switch (mode) {
	case STATION_POWER_SAVE_MODE:
	case STATION_POWER_SAVE_MODE:
		wl1251_debug(DEBUG_PSM, "entering psm");
		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);
		ret = wl1251_cmd_ps_mode(wl, STATION_POWER_SAVE_MODE);
		if (ret < 0)
		if (ret < 0)
			return ret;
			return ret;
@@ -135,6 +142,12 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode)
		if (ret < 0)
		if (ret < 0)
			return ret;
			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);
		ret = wl1251_cmd_ps_mode(wl, STATION_ACTIVE_MODE);
		if (ret < 0)
		if (ret < 0)
			return ret;
			return ret;