diff options
author | Arik Nemtsov <arik@wizery.com> | 2011-02-22 22:22:25 (GMT) |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-02-23 09:14:55 (GMT) |
commit | 99a2775d02a7accf4cc661a65c76fd7b379d1c7a (patch) | |
tree | fb2031356dca5064540e467293e6dc6aa9d803bb /drivers/net/wireless/wl12xx/acx.c | |
parent | f4d08ddd3e60c79a141be36a5f3a7294c619291d (diff) | |
download | linux-99a2775d02a7accf4cc661a65c76fd7b379d1c7a.tar.xz |
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.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c index 6d53129..3badc6b 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; +} |