[PATCH] ipw2200: Fix WPA network selection problem
authorStefan Rompf <stefan@loplof.de>
Mon, 6 Feb 2006 19:42:23 +0000 (03:42 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 17 Feb 2006 13:16:59 +0000 (08:16 -0500)
Do not avoid APs with wpa_ie or rsn_ie if !ieee->wpa_enabled
There are broken APs out there that fill these elements even
though encryption is disnabled. Also, this breaks legit WEP to
WPA migration scenarious.

We add a checking to prohibite WPA configured STA trying to
associate with non-WPA supported APs.

Signed-off-by: Stefan Rompf <stefan@loplof.de>
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ipw2200.c

index 0702f0eeb784ca56f68bf38c543675cd3aeb295e..02d2dae85c4cf3a989d1cb9a3b0c92c8b8d376ca 100644 (file)
@@ -5533,8 +5533,8 @@ static int ipw_best_network(struct ipw_priv *priv,
                return 0;
        }
 
-       if (!priv->ieee->wpa_enabled && (network->wpa_ie_len > 0 ||
-                                        network->rsn_ie_len > 0)) {
+       if (priv->ieee->wpa_enabled &&
+           network->wpa_ie_len == 0 && network->rsn_ie_len == 0) {
                IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded "
                                "because of WPA capability mismatch.\n",
                                escape_essid(network->ssid, network->ssid_len),