aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_cmd.c
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-02-18 06:25:36 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-02-19 15:52:42 -0500
commitd8c42c0c282a5edd9ea2eef4c929d9cec2798653 (patch)
tree63af39e5de1c1c878d3abc72e42c380289704f39 /drivers/net/wireless/wl12xx/wl1271_cmd.c
parente2117cea27c6b27e1a379acac5eb0433eeb7033a (diff)
wl1271: Fix PSM entry
Currently the PSM entry function assumes successful operation, and enables ELP, BET and beacon filtering right away. This is bad, because the PSM entry may fail due to environmental issues, which will cause the ELP, BET and beacon filtering to be illegally enabled (because FW remains in active state.) Fix this by enabling ELP, BET and beacon filtering only after successful entry, and by ensuring the firmware is in active mode after the failure. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_cmd.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index a74259bb596b..dd2b5f0540a5 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -555,7 +555,7 @@ out:
555 return ret; 555 return ret;
556} 556}
557 557
558int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode) 558int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode, bool send)
559{ 559{
560 struct wl1271_cmd_ps_params *ps_params = NULL; 560 struct wl1271_cmd_ps_params *ps_params = NULL;
561 int ret = 0; 561 int ret = 0;
@@ -576,7 +576,7 @@ int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode)
576 } 576 }
577 577
578 ps_params->ps_mode = ps_mode; 578 ps_params->ps_mode = ps_mode;
579 ps_params->send_null_data = 1; 579 ps_params->send_null_data = send;
580 ps_params->retries = 5; 580 ps_params->retries = 5;
581 ps_params->hang_over_period = 128; 581 ps_params->hang_over_period = 128;
582 ps_params->null_data_rate = cpu_to_le32(1); /* 1 Mbps */ 582 ps_params->null_data_rate = cpu_to_le32(1); /* 1 Mbps */