]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
atmel: try open system authentication too
authorDan Williams <dcbw@redhat.com>
Mon, 18 Aug 2008 19:32:41 +0000 (15:32 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 27 Aug 2008 00:06:30 +0000 (20:06 -0400)
When the AP rejects a Shared Key authentication request, try Open System
auth too.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/atmel.c

index f23bcd07dee87068644a7ea5c00c78e69b1257b4..bd65c485098c4bb8b33c0fa84d8fffcb0a677b1e 100644 (file)
@@ -3062,12 +3062,20 @@ static void authenticate(struct atmel_private *priv, u16 frame_len)
        }
 
        if (status == WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG) {
-               /* Do opensystem first, then try sharedkey */
+               /* Flip back and forth between WEP auth modes until the max
+                * authentication tries has been exceeded.
+                */
                if (system == WLAN_AUTH_OPEN) {
                        priv->CurrentAuthentTransactionSeqNum = 0x001;
                        priv->exclude_unencrypted = 1;
                        send_authentication_request(priv, WLAN_AUTH_SHARED_KEY, NULL, 0);
                        return;
+               } else if (   system == WLAN_AUTH_SHARED_KEY
+                          && priv->wep_is_on) {
+                       priv->CurrentAuthentTransactionSeqNum = 0x001;
+                       priv->exclude_unencrypted = 0;
+                       send_authentication_request(priv, WLAN_AUTH_OPEN, NULL, 0);
+                       return;
                } else if (priv->connect_to_any_BSS) {
                        int bss_index;