diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2008-08-07 18:50:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-22 16:29:59 -0400 |
commit | 6042a3e3ff7943e4ff5cbcb8c223ea87337501ea (patch) | |
tree | 299af6b93c402be6bb25a62492123a79656f1ede /net/mac80211/mlme.c | |
parent | 008c44825db74c6cdcea13dfb1598896e74fe908 (diff) |
mac80211: change number of pre-assoc scans
This patch fixes noticed problem in noisy environments of 50+ APs
that scan fails to find the requested AP on first try, which
leads to connection refusal. second scan has empirically proven to fix
this problem in almost all cases.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Esti Kummer <ester.kummer@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index f05519d1c2c6..e821d1ac5b00 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "led.h" | 34 | #include "led.h" |
35 | #include "mesh.h" | 35 | #include "mesh.h" |
36 | 36 | ||
37 | #define IEEE80211_ASSOC_SCANS_MAX_TRIES 2 | ||
37 | #define IEEE80211_AUTH_TIMEOUT (HZ / 5) | 38 | #define IEEE80211_AUTH_TIMEOUT (HZ / 5) |
38 | #define IEEE80211_AUTH_MAX_TRIES 3 | 39 | #define IEEE80211_AUTH_MAX_TRIES 3 |
39 | #define IEEE80211_ASSOC_TIMEOUT (HZ / 5) | 40 | #define IEEE80211_ASSOC_TIMEOUT (HZ / 5) |
@@ -596,6 +597,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, | |||
596 | { | 597 | { |
597 | if (deauth) | 598 | if (deauth) |
598 | ifsta->auth_tries = 0; | 599 | ifsta->auth_tries = 0; |
600 | ifsta->assoc_scan_tries = 0; | ||
599 | ifsta->assoc_tries = 0; | 601 | ifsta->assoc_tries = 0; |
600 | ieee80211_set_associated(sdata, ifsta, 0); | 602 | ieee80211_set_associated(sdata, ifsta, 0); |
601 | } | 603 | } |
@@ -3405,7 +3407,9 @@ static void ieee80211_sta_reset_auth(struct ieee80211_sub_if_data *sdata, | |||
3405 | ifsta->auth_alg = WLAN_AUTH_OPEN; | 3407 | ifsta->auth_alg = WLAN_AUTH_OPEN; |
3406 | ifsta->auth_transaction = -1; | 3408 | ifsta->auth_transaction = -1; |
3407 | ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; | 3409 | ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; |
3408 | ifsta->auth_tries = ifsta->assoc_tries = 0; | 3410 | ifsta->assoc_scan_tries = 0; |
3411 | ifsta->auth_tries = 0; | ||
3412 | ifsta->assoc_tries = 0; | ||
3409 | netif_carrier_off(sdata->dev); | 3413 | netif_carrier_off(sdata->dev); |
3410 | } | 3414 | } |
3411 | 3415 | ||
@@ -3510,7 +3514,8 @@ static int ieee80211_sta_config_auth(struct ieee80211_sub_if_data *sdata, | |||
3510 | ieee80211_sta_reset_auth(sdata, ifsta); | 3514 | ieee80211_sta_reset_auth(sdata, ifsta); |
3511 | return 0; | 3515 | return 0; |
3512 | } else { | 3516 | } else { |
3513 | if (ifsta->state != IEEE80211_STA_MLME_AUTHENTICATE) { | 3517 | if (ifsta->assoc_scan_tries < IEEE80211_ASSOC_SCANS_MAX_TRIES) { |
3518 | ifsta->assoc_scan_tries++; | ||
3514 | if (ifsta->flags & IEEE80211_STA_AUTO_SSID_SEL) | 3519 | if (ifsta->flags & IEEE80211_STA_AUTO_SSID_SEL) |
3515 | ieee80211_sta_start_scan(sdata, NULL, 0); | 3520 | ieee80211_sta_start_scan(sdata, NULL, 0); |
3516 | else | 3521 | else |