diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2009-10-16 01:18:57 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:48:27 -0400 |
commit | 9829e1b510214956bc9d5e278be49d781e1a6fbf (patch) | |
tree | 412d0c279ee0a341ad467da3d466e7d8f505b1fd /drivers/net/wireless/iwmc3200wifi/rx.c | |
parent | 56e3f085f5b5e49cca37a3d1b0aa4266b984eb12 (diff) |
iwmc3200wifi: Try shared auth when open WEP fails
When we fail to associate with an open WEP AP, we fall back to shared auth.
This allows us to support joining a shared auth WEP AP with iwconfig.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/rx.c')
-rw-r--r-- | drivers/net/wireless/iwmc3200wifi/rx.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c index 648f84a83705..5fa0a63ef0bf 100644 --- a/drivers/net/wireless/iwmc3200wifi/rx.c +++ b/drivers/net/wireless/iwmc3200wifi/rx.c | |||
@@ -501,6 +501,18 @@ static int iwm_mlme_assoc_start(struct iwm_priv *iwm, u8 *buf, | |||
501 | return 0; | 501 | return 0; |
502 | } | 502 | } |
503 | 503 | ||
504 | static u8 iwm_is_open_wep_profile(struct iwm_priv *iwm) | ||
505 | { | ||
506 | if ((iwm->umac_profile->sec.ucast_cipher == UMAC_CIPHER_TYPE_WEP_40 || | ||
507 | iwm->umac_profile->sec.ucast_cipher == UMAC_CIPHER_TYPE_WEP_104) && | ||
508 | (iwm->umac_profile->sec.ucast_cipher == | ||
509 | iwm->umac_profile->sec.mcast_cipher) && | ||
510 | (iwm->umac_profile->sec.auth_type == UMAC_AUTH_TYPE_OPEN)) | ||
511 | return 1; | ||
512 | |||
513 | return 0; | ||
514 | } | ||
515 | |||
504 | static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf, | 516 | static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf, |
505 | unsigned long buf_size, | 517 | unsigned long buf_size, |
506 | struct iwm_wifi_cmd *cmd) | 518 | struct iwm_wifi_cmd *cmd) |
@@ -566,11 +578,17 @@ static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf, | |||
566 | goto ibss; | 578 | goto ibss; |
567 | 579 | ||
568 | if (!test_bit(IWM_STATUS_RESETTING, &iwm->status)) | 580 | if (!test_bit(IWM_STATUS_RESETTING, &iwm->status)) |
569 | cfg80211_connect_result(iwm_to_ndev(iwm), | 581 | if (!iwm_is_open_wep_profile(iwm)) { |
570 | complete->bssid, | 582 | cfg80211_connect_result(iwm_to_ndev(iwm), |
571 | NULL, 0, NULL, 0, | 583 | complete->bssid, |
572 | WLAN_STATUS_UNSPECIFIED_FAILURE, | 584 | NULL, 0, NULL, 0, |
573 | GFP_KERNEL); | 585 | WLAN_STATUS_UNSPECIFIED_FAILURE, |
586 | GFP_KERNEL); | ||
587 | } else { | ||
588 | /* Let's try shared WEP auth */ | ||
589 | IWM_ERR(iwm, "Trying WEP shared auth\n"); | ||
590 | schedule_work(&iwm->auth_retry_worker); | ||
591 | } | ||
574 | else | 592 | else |
575 | cfg80211_disconnected(iwm_to_ndev(iwm), 0, NULL, 0, | 593 | cfg80211_disconnected(iwm_to_ndev(iwm), 0, NULL, 0, |
576 | GFP_KERNEL); | 594 | GFP_KERNEL); |