aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_acx.c
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-03-26 06:53:23 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-03-31 14:39:14 -0400
commit6ccbb92ead9379d7de2cc25cd950d15a8d22e0c9 (patch)
tree51c618b5c033cde8317f62a1763259047d8ff4ce /drivers/net/wireless/wl12xx/wl1271_acx.c
parente7942235f2496587cb4af86168e54d588ffcbd4f (diff)
wl1271: Disable connection monitoring while not associated
The wl1271 does not support disabling the connection monitor feature. Perform the next best thing by increasing the beacon-loss threshold and BSS_LOSE event timeout to the maximum values. This is needed, because we really don't want any random probe-requests during scanning or especially while in ad-hoc mode and not beaconing. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_acx.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_acx.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.c b/drivers/net/wireless/wl12xx/wl1271_acx.c
index 7e337cea9905..e7d11811a907 100644
--- a/drivers/net/wireless/wl12xx/wl1271_acx.c
+++ b/drivers/net/wireless/wl12xx/wl1271_acx.c
@@ -504,12 +504,17 @@ out:
504 return ret; 504 return ret;
505} 505}
506 506
507int wl1271_acx_conn_monit_params(struct wl1271 *wl) 507#define ACX_CONN_MONIT_DISABLE_VALUE 0xffffffff
508
509int wl1271_acx_conn_monit_params(struct wl1271 *wl, bool enable)
508{ 510{
509 struct acx_conn_monit_params *acx; 511 struct acx_conn_monit_params *acx;
512 u32 threshold = ACX_CONN_MONIT_DISABLE_VALUE;
513 u32 timeout = ACX_CONN_MONIT_DISABLE_VALUE;
510 int ret; 514 int ret;
511 515
512 wl1271_debug(DEBUG_ACX, "acx connection monitor parameters"); 516 wl1271_debug(DEBUG_ACX, "acx connection monitor parameters: %s",
517 enable ? "enabled" : "disabled");
513 518
514 acx = kzalloc(sizeof(*acx), GFP_KERNEL); 519 acx = kzalloc(sizeof(*acx), GFP_KERNEL);
515 if (!acx) { 520 if (!acx) {
@@ -517,8 +522,13 @@ int wl1271_acx_conn_monit_params(struct wl1271 *wl)
517 goto out; 522 goto out;
518 } 523 }
519 524
520 acx->synch_fail_thold = cpu_to_le32(wl->conf.conn.synch_fail_thold); 525 if (enable) {
521 acx->bss_lose_timeout = cpu_to_le32(wl->conf.conn.bss_lose_timeout); 526 threshold = wl->conf.conn.synch_fail_thold;
527 timeout = wl->conf.conn.bss_lose_timeout;
528 }
529
530 acx->synch_fail_thold = cpu_to_le32(threshold);
531 acx->bss_lose_timeout = cpu_to_le32(timeout);
522 532
523 ret = wl1271_cmd_configure(wl, ACX_CONN_MONIT_PARAMS, 533 ret = wl1271_cmd_configure(wl, ACX_CONN_MONIT_PARAMS,
524 acx, sizeof(*acx)); 534 acx, sizeof(*acx));