summaryrefslogtreecommitdiff
path: root/drivers/staging/cw1200/sta.c
diff options
context:
space:
mode:
authorDmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>2011-05-01 17:20:35 +0200
committerRobert Marklund <robert.marklund@stericsson.com>2011-10-05 11:17:21 +0200
commitce2b94755da9c2a080057cd0beb10018274099b2 (patch)
tree10187e432b11e2a04e1fc06e9851d96b3d32cca4 /drivers/staging/cw1200/sta.c
parent2f45b20f339a8e033acfb278239b5d96fcd4fac0 (diff)
WLAN: CW1200: Power management is implemnted.
Power management is on in this commit. Device is configured in quiescent mode when idle and in dose mode when operating. BH always checks if device is awake before trying to access it. Timeout for putting device back to sleep is 1 second after last device access. Verification with WSM_A21.05.0288 shows that device is staying awake even in quiescent mode. Bug in firmware? To be investigated. Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Diffstat (limited to 'drivers/staging/cw1200/sta.c')
-rw-r--r--drivers/staging/cw1200/sta.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/staging/cw1200/sta.c b/drivers/staging/cw1200/sta.c
index 3bb17b1e616..0ae58e7bc02 100644
--- a/drivers/staging/cw1200/sta.c
+++ b/drivers/staging/cw1200/sta.c
@@ -283,12 +283,14 @@ int cw1200_config(struct ieee80211_hw *dev, u32 changed)
if (changed & IEEE80211_CONF_CHANGE_IDLE) {
struct wsm_operational_mode mode = {
- /* TODO: wsm_power_mode_quiescent is more efficient,
- * but it requires AI to get device on again. */
.power_mode = (conf->flags & IEEE80211_CONF_IDLE) ?
- wsm_power_mode_doze : wsm_power_mode_active
+ wsm_power_mode_quiescent :
+ wsm_power_mode_doze,
+ .disableMoreFlagUsage = true,
};
+ wsm_lock_tx(priv);
WARN_ON(wsm_set_operational_mode(priv, &mode));
+ wsm_unlock_tx(priv);
}
if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) {