History log of /drivers/net/wireless/wl1251/ps.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1e5f52de216a32986a5c3cbc358dbb2620a03047 04-Apr-2011 Jarkko Nikula <jhnikula@gmail.com> wl1251: Add support for idle mode

On Nokia N900 the wl1251 consumes the most power when the interface is up
but not associated to access point (that supports PSM). In terms of battery
current consumption, the consumption is ~180 mA higher when the interface is
up but not associated and only ~5 mA higher when associated compared to
interface down and driver not loaded cases.

This patch adds support for the mac80211 idle notifications. Chip is put into
idle very much the same way when entering into PSM by utilizing the Extreme
Low Power (ELP) mode. I.e. idle is entered by setting necessary conditions
in wl1251_ps_set_mode followed by a call to wl1251_ps_elp_sleep.

It seems it is just enough the authorize ELP mode followed by
CMD_DISCONNECT (thanks to Kalle Valo about the idea to use it).
Without disconnect command the chip remains somewhat active and stays
consuming ~20 mA. Idle mode is left by same way than PSM. The wl1251_join
call is used to revert the CMD_DISCONNECT. Without it association to AP
doesn't work when trying second time.

With this patch the interface up but not associated case the battery current
consumption is less than 1 mA higher compared to interface down case.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/wl1251/ps.c
a0bbb58bcb70295ff05f870c93d34f9fbe614204 04-Apr-2011 Jarkko Nikula <jhnikula@gmail.com> wl1251: Prepare for idle mode support

RFC for WL1251 idle mode support brought a few issues that are worth to
update before adding the idle mode support.

Since the idle mode can reuse the code that is now used in Power Save Mode
(PSM), the flag psm in struct wl1251 is changed to variable station_mode
to be able to distinguish between PSM and idle modes.

As the station mode is different than the power power save mode command
that is sent to chip, the enum wl1251_cmd_ps_mod values are used only when
communicating with the chip and new enum wl1251_station_mode values are used
inside the driver.

Confusing comment about psm and elp relation is removed since the PSM is
actually activated by putting the chip into Entreme Low Power (ELP) mode.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/wl1251/ps.c
5f6722ee63a45d4ad3412743d161ec54d6c32ccc 06-Mar-2011 Grazvydas Ignotas <notasas@gmail.com> wl1251: fix elp_work race condition

While working on PS I've noticed elp_work is kicking rather often, and
sometimes the chip is put to sleep before 5ms delay expires. This
seems to happen because by the time wl1251_ps_elp_wakeup is called
elp_work might still be pending. After wakeup is done, the processing
may take some time, during which 5ms might expire and elp_work might
get scheduled. In this case, ss soon as 1st thread finishes work and
releases the mutex, elp_work will then put the device to sleep without
5ms delay. In addition 1st thread will queue additional elp_work
needlessly.

Fix this by cancelling work in wl1251_ps_elp_wakeup instead.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/wl1251/ps.c
d0c331aff99ca75f9aa0f794cf68b572d8ec7c5a 06-Mar-2011 Grazvydas Ignotas <notasas@gmail.com> wl1251: remove wl1251_ps_set_elp function

wl1251_ps_set_elp() only does acx_sleep_auth call and takes the chip
from/to ELP, however all callers of wl1251_ps_set_mode() have already
taken the chip out of ELP and puts it back to ELP when they finish.
This makes ELP calls (and register writes they result in) superfluous.

So remove wl1251_ps_set_elp function and call acx_sleep_auth directly.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/wl1251/ps.c
c3e334d29484423e78009790a3d3fa78da8b43a1 30-Jan-2011 David Gnedt <david.gnedt@davizone.at> wl1251: enable beacon early termination while in power-saving mode

Port the beacon early termination feature from wl1251 driver version
included in the Maemo Fremantle kernel.
It is enabled when going to power-saving mode and disabled when leaving
power-saving mode.

Signed-off-by: David Gnedt <david.gnedt@davizone.at>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/wl1251/ps.c
9bc6772e15d25f58c1be638031280e04514287d4 10-Oct-2010 Kalle Valo <kvalo@adurom.com> wl1251: move to it's own directory

wl1271 driver is under heavy development but on the other hand the older
wl1251 driver is currently considered more as a legacy driver. To make it
easier to develop wl1271 features move wl1251 to it's own directory,
drivers/net/wireless/wl1251.

There are no functional changes, only moving of files. One regression
is that Kconfig won't be updated automatically and user needs to enable
wl1251 manually with an older config file.

Signed-off-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/wl1251/ps.c