summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/acx.c
diff options
context:
space:
mode:
authorArik Nemtsov2011-02-22 23:22:25 +0100
committerLuciano Coelho2011-02-23 10:14:55 +0100
commit99a2775d02a7accf4cc661a65c76fd7b379d1c7a (patch)
treefb2031356dca5064540e467293e6dc6aa9d803bb /drivers/net/wireless/wl12xx/acx.c
parentwl12xx: fix potential race condition with TX queue watermark (diff)
downloadkernel-qcow2-linux-99a2775d02a7accf4cc661a65c76fd7b379d1c7a.tar.gz
kernel-qcow2-linux-99a2775d02a7accf4cc661a65c76fd7b379d1c7a.tar.xz
kernel-qcow2-linux-99a2775d02a7accf4cc661a65c76fd7b379d1c7a.zip
wl12xx: AP-mode - fix race condition on sta connection
If a sta starts transmitting immediately after authentication, sometimes the FW deauthenticates it. Fix this by marking the sta "in-connection" in FW before sending the autentication response. The "in-connection" entry is automatically removed when connection succeeds or after a timeout. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/acx.c')
-rw-r--r--drivers/net/wireless/wl12xx/acx.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c
index 6d5312990f79..3badc6bb7866 100644
--- a/drivers/net/wireless/wl12xx/acx.c
+++ b/drivers/net/wireless/wl12xx/acx.c
@@ -1541,3 +1541,28 @@ out:
kfree(config_ps);
return ret;
}
+
+int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr)
+{
+ struct wl1271_acx_inconnection_sta *acx = NULL;
+ int ret;
+
+ wl1271_debug(DEBUG_ACX, "acx set inconnaction sta %pM", addr);
+
+ acx = kzalloc(sizeof(*acx), GFP_KERNEL);
+ if (!acx)
+ return -ENOMEM;
+
+ memcpy(acx->addr, addr, ETH_ALEN);
+
+ ret = wl1271_cmd_configure(wl, ACX_UPDATE_INCONNECTION_STA_LIST,
+ acx, sizeof(*acx));
+ if (ret < 0) {
+ wl1271_warning("acx set inconnaction sta failed: %d", ret);
+ goto out;
+ }
+
+out:
+ kfree(acx);
+ return ret;
+}