[PATCH] ipw2200: Add LEAP authentication algorithm support
Signed-off-by: Hong Liu <hong.liu@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
@@ -6256,6 +6256,9 @@ static int ipw_wpa_set_auth_algs(struct ipw_priv *priv, int value)
|
|||||||
} else if (value & IW_AUTH_ALG_OPEN_SYSTEM) {
|
} else if (value & IW_AUTH_ALG_OPEN_SYSTEM) {
|
||||||
sec.auth_mode = WLAN_AUTH_OPEN;
|
sec.auth_mode = WLAN_AUTH_OPEN;
|
||||||
ieee->open_wep = 1;
|
ieee->open_wep = 1;
|
||||||
|
} else if (value & IW_AUTH_ALG_LEAP) {
|
||||||
|
sec.auth_mode = WLAN_AUTH_LEAP;
|
||||||
|
ieee->open_wep = 1;
|
||||||
} else
|
} else
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@@ -7116,19 +7119,22 @@ static int ipw_associate_network(struct ipw_priv *priv,
|
|||||||
|
|
||||||
memset(&priv->assoc_request, 0, sizeof(priv->assoc_request));
|
memset(&priv->assoc_request, 0, sizeof(priv->assoc_request));
|
||||||
priv->assoc_request.channel = network->channel;
|
priv->assoc_request.channel = network->channel;
|
||||||
|
priv->assoc_request.auth_key = 0;
|
||||||
|
|
||||||
if ((priv->capability & CAP_PRIVACY_ON) &&
|
if ((priv->capability & CAP_PRIVACY_ON) &&
|
||||||
(priv->capability & CAP_SHARED_KEY)) {
|
(priv->ieee->sec.auth_mode == WLAN_AUTH_SHARED_KEY)) {
|
||||||
priv->assoc_request.auth_type = AUTH_SHARED_KEY;
|
priv->assoc_request.auth_type = AUTH_SHARED_KEY;
|
||||||
priv->assoc_request.auth_key = priv->ieee->sec.active_key;
|
priv->assoc_request.auth_key = priv->ieee->sec.active_key;
|
||||||
|
|
||||||
if ((priv->capability & CAP_PRIVACY_ON) &&
|
if ((priv->ieee->sec.level == SEC_LEVEL_1) &&
|
||||||
(priv->ieee->sec.level == SEC_LEVEL_1) &&
|
|
||||||
!(priv->ieee->host_encrypt || priv->ieee->host_decrypt))
|
!(priv->ieee->host_encrypt || priv->ieee->host_decrypt))
|
||||||
ipw_send_wep_keys(priv, DCW_WEP_KEY_SEC_TYPE_WEP);
|
ipw_send_wep_keys(priv, DCW_WEP_KEY_SEC_TYPE_WEP);
|
||||||
} else {
|
|
||||||
|
} else if ((priv->capability & CAP_PRIVACY_ON) &&
|
||||||
|
(priv->ieee->sec.auth_mode == WLAN_AUTH_LEAP))
|
||||||
|
priv->assoc_request.auth_type = AUTH_LEAP;
|
||||||
|
else
|
||||||
priv->assoc_request.auth_type = AUTH_OPEN;
|
priv->assoc_request.auth_type = AUTH_OPEN;
|
||||||
priv->assoc_request.auth_key = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (priv->ieee->wpa_ie_len) {
|
if (priv->ieee->wpa_ie_len) {
|
||||||
priv->assoc_request.policy_support = 0x02; /* RSN active */
|
priv->assoc_request.policy_support = 0x02; /* RSN active */
|
||||||
|
@@ -1657,9 +1657,10 @@ enum {
|
|||||||
IPW_FW_ERROR_FATAL_ERROR
|
IPW_FW_ERROR_FATAL_ERROR
|
||||||
};
|
};
|
||||||
|
|
||||||
#define AUTH_OPEN 0
|
#define AUTH_OPEN 0
|
||||||
#define AUTH_SHARED_KEY 1
|
#define AUTH_SHARED_KEY 1
|
||||||
#define AUTH_IGNORE 3
|
#define AUTH_LEAP 2
|
||||||
|
#define AUTH_IGNORE 3
|
||||||
|
|
||||||
#define HC_ASSOCIATE 0
|
#define HC_ASSOCIATE 0
|
||||||
#define HC_REASSOCIATE 1
|
#define HC_REASSOCIATE 1
|
||||||
|
Reference in New Issue
Block a user