]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - wl12xx/wl12xx.git/commitdiff
wl12xx: decrease elp timeout to 20ms R5.xx_Build-96
authorEyal Shapira <eyal@wizery.com>
Thu, 18 Oct 2012 16:05:24 +0000 (18:05 +0200)
committerEyal Shapira <eyal@wizery.com>
Thu, 18 Oct 2012 16:16:12 +0000 (18:16 +0200)
The current elp timeout set to 200 ms is too high.
While its purpose was to avoid going to ELP
during Tx/Rx the problem is that it keeps the
device awake also after issuing commands when there's
no traffic. In Android this is a real problem as
RSSI is polled by the framework every 3 seconds
and keeping the chip out of ELP for 200ms each time
has a significant power consumption effect.

Fix that by changing to 20ms. This prevents excessive
real elp sleeps and wakeups during Rx/Tx with 12xx.
There's no real need any more for setting a hard
coded 5ms while in forced_ps.

The fw won't enter elp anyways before the dynamic-ps
timeout expired as well (and it entered ps
successfully).

(Based on a similar patch by Eliad for wlcore)

Signed-off-by: Eyal Shapira <eyal@wizery.com>
drivers/net/wireless/wl12xx/main.c
drivers/net/wireless/wl12xx/ps.c

index e97a9220a84c9b6958072e226258e9209806c9d3..c12cfe0b9b84dab454473a7e733e86045aee5b78 100644 (file)
@@ -264,7 +264,7 @@ static struct conf_drv_settings default_conf = {
                .forced_ps                   = false,
                .keep_alive_interval         = 55000,
                .max_listen_interval         = 20,
-               .elp_timeout                 = 200,
+               .elp_timeout                 = 20,
        },
        .itrim = {
                .enable = false,
index 0f19a664ef8a611db563ca5450db1ecf95eacee8..9b3c4d3e4e3da78ea0ad25d5da0b1ece912d76d6 100644 (file)
@@ -76,8 +76,6 @@ out:
        mutex_unlock(&wl->mutex);
 }
 
-#define ELP_ENTRY_DELAY  5
-
 /* Routines to toggle sleep mode while in ELP */
 void wl1271_ps_elp_sleep(struct wl1271 *wl)
 {
@@ -97,11 +95,7 @@ void wl1271_ps_elp_sleep(struct wl1271 *wl)
                        return;
        }
 
-       if (wl->conf.conn.forced_ps)
-               timeout = ELP_ENTRY_DELAY;
-       else
-               timeout = wl->conf.conn.elp_timeout;
-
+       timeout = wl->conf.conn.elp_timeout;
        ieee80211_queue_delayed_work(wl->hw, &wl->elp_work,
                                     msecs_to_jiffies(timeout));
 }