diff options
author | Eyal Shapira <eyal@wizery.com> | 2012-02-02 12:06:45 -0500 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-02-15 01:38:33 -0500 |
commit | 5c0dc2fcfec606cf9f2d28ff31bbeb0a6225b27a (patch) | |
tree | be845615117febc537aa6a11f0fe5a79ca064467 /drivers/net/wireless/wl12xx/main.c | |
parent | 59a10c66d0a1970d3f8a7e65bb1f03dec3aae3c5 (diff) |
wl12xx: add forced_ps mode
For certain WiFi certification tests forcing PS
is necessary. Since DPS is now enabled in the FW
and this can't be achieved by using netlatency
this required a new config option.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index fa61dfd2084c..b828149a1655 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -247,6 +247,7 @@ static struct conf_drv_settings default_conf = { | |||
247 | .psm_exit_retries = 16, | 247 | .psm_exit_retries = 16, |
248 | .psm_entry_nullfunc_retries = 3, | 248 | .psm_entry_nullfunc_retries = 3, |
249 | .dynamic_ps_timeout = 100, | 249 | .dynamic_ps_timeout = 100, |
250 | .forced_ps = false, | ||
250 | .keep_alive_interval = 55000, | 251 | .keep_alive_interval = 55000, |
251 | .max_listen_interval = 20, | 252 | .max_listen_interval = 20, |
252 | }, | 253 | }, |
@@ -2510,17 +2511,29 @@ static int wl12xx_config_vif(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
2510 | 2511 | ||
2511 | if ((conf->flags & IEEE80211_CONF_PS) && | 2512 | if ((conf->flags & IEEE80211_CONF_PS) && |
2512 | test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) && | 2513 | test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) && |
2513 | !test_bit(WLVIF_FLAG_IN_AUTO_PS, &wlvif->flags)) { | 2514 | !test_bit(WLVIF_FLAG_IN_PS, &wlvif->flags)) { |
2514 | 2515 | ||
2515 | wl1271_debug(DEBUG_PSM, "auto ps enabled"); | 2516 | int ps_mode; |
2517 | char *ps_mode_str; | ||
2518 | |||
2519 | if (wl->conf.conn.forced_ps) { | ||
2520 | ps_mode = STATION_POWER_SAVE_MODE; | ||
2521 | ps_mode_str = "forced"; | ||
2522 | } else { | ||
2523 | ps_mode = STATION_AUTO_PS_MODE; | ||
2524 | ps_mode_str = "auto"; | ||
2525 | } | ||
2526 | |||
2527 | wl1271_debug(DEBUG_PSM, "%s ps enabled", ps_mode_str); | ||
2528 | |||
2529 | ret = wl1271_ps_set_mode(wl, wlvif, ps_mode); | ||
2516 | 2530 | ||
2517 | ret = wl1271_ps_set_mode(wl, wlvif, | ||
2518 | STATION_AUTO_PS_MODE); | ||
2519 | if (ret < 0) | 2531 | if (ret < 0) |
2520 | wl1271_warning("enter auto ps failed %d", ret); | 2532 | wl1271_warning("enter %s ps failed %d", |
2533 | ps_mode_str, ret); | ||
2521 | 2534 | ||
2522 | } else if (!(conf->flags & IEEE80211_CONF_PS) && | 2535 | } else if (!(conf->flags & IEEE80211_CONF_PS) && |
2523 | test_bit(WLVIF_FLAG_IN_AUTO_PS, &wlvif->flags)) { | 2536 | test_bit(WLVIF_FLAG_IN_PS, &wlvif->flags)) { |
2524 | 2537 | ||
2525 | wl1271_debug(DEBUG_PSM, "auto ps disabled"); | 2538 | wl1271_debug(DEBUG_PSM, "auto ps disabled"); |
2526 | 2539 | ||