aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-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 @@
28 28
29#define WL1271_WAKEUP_TIMEOUT 500 29#define WL1271_WAKEUP_TIMEOUT 500
30 30
31#define ELP_ENTRY_DELAY 5
32
31void wl1271_elp_work(struct work_struct *work) 33void wl1271_elp_work(struct work_struct *work)
32{ 34{
33 struct delayed_work *dwork; 35 struct delayed_work *dwork;
@@ -72,6 +74,7 @@ out:
72void wl1271_ps_elp_sleep(struct wl1271 *wl) 74void wl1271_ps_elp_sleep(struct wl1271 *wl)
73{ 75{
74 struct wl12xx_vif *wlvif; 76 struct wl12xx_vif *wlvif;
77 u32 timeout;
75 78
76 if (wl->quirks & WLCORE_QUIRK_NO_ELP) 79 if (wl->quirks & WLCORE_QUIRK_NO_ELP)
77 return; 80 return;
@@ -89,8 +92,13 @@ void wl1271_ps_elp_sleep(struct wl1271 *wl)
89 return; 92 return;
90 } 93 }
91 94
95 if (wl->conf.conn.forced_ps)
96 timeout = ELP_ENTRY_DELAY;
97 else
98 timeout = wl->conf.conn.dynamic_ps_timeout;
99
92 ieee80211_queue_delayed_work(wl->hw, &wl->elp_work, 100 ieee80211_queue_delayed_work(wl->hw, &wl->elp_work,
93 msecs_to_jiffies(wl->conf.conn.dynamic_ps_timeout)); 101 msecs_to_jiffies(timeout));
94} 102}
95 103
96int wl1271_ps_elp_wakeup(struct wl1271 *wl) 104int wl1271_ps_elp_wakeup(struct wl1271 *wl)