aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti/wlcore/ps.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2012-05-15 17:08:52 +0300
committerLuciano Coelho <coelho@ti.com>2012-06-05 17:16:08 +0300
commit1ab0f212629462ae2600bb3523dc75b96e8544eb (patch)
treeeb6cad375cb768583b47f1800653a5370f553a14 /drivers/net/wireless/ti/wlcore/ps.c
parentwlcore: fix sparse warnings related to static functions (diff)
downloadlinux-dev-1ab0f212629462ae2600bb3523dc75b96e8544eb.tar.xz
linux-dev-1ab0f212629462ae2600bb3523dc75b96e8544eb.zip
wlcore: use the original elp time in forced_ps mode
The dynamic PS timeout is meaningless in forced PS mode. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/ps.c')
-rw-r--r--drivers/net/wireless/ti/wlcore/ps.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/ti/wlcore/ps.c b/drivers/net/wireless/ti/wlcore/ps.c
index 756eee2257b4..958535dee9f3 100644
--- a/drivers/net/wireless/ti/wlcore/ps.c
+++ b/drivers/net/wireless/ti/wlcore/ps.c
@@ -28,6 +28,8 @@
#define WL1271_WAKEUP_TIMEOUT 500
+#define ELP_ENTRY_DELAY 5
+
void wl1271_elp_work(struct work_struct *work)
{
struct delayed_work *dwork;
@@ -72,6 +74,7 @@ out:
void wl1271_ps_elp_sleep(struct wl1271 *wl)
{
struct wl12xx_vif *wlvif;
+ u32 timeout;
if (wl->quirks & WLCORE_QUIRK_NO_ELP)
return;
@@ -89,8 +92,13 @@ void wl1271_ps_elp_sleep(struct wl1271 *wl)
return;
}
+ if (wl->conf.conn.forced_ps)
+ timeout = ELP_ENTRY_DELAY;
+ else
+ timeout = wl->conf.conn.dynamic_ps_timeout;
+
ieee80211_queue_delayed_work(wl->hw, &wl->elp_work,
- msecs_to_jiffies(wl->conf.conn.dynamic_ps_timeout));
+ msecs_to_jiffies(timeout));
}
int wl1271_ps_elp_wakeup(struct wl1271 *wl)