diff options
-rw-r--r-- | net/mac80211/mlme.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index e3e7d2be9e41..e5c3cf405060 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -31,10 +31,12 @@ | |||
31 | #include "led.h" | 31 | #include "led.h" |
32 | 32 | ||
33 | #define IEEE80211_AUTH_TIMEOUT (HZ / 5) | 33 | #define IEEE80211_AUTH_TIMEOUT (HZ / 5) |
34 | #define IEEE80211_AUTH_TIMEOUT_LONG (HZ / 2) | ||
34 | #define IEEE80211_AUTH_TIMEOUT_SHORT (HZ / 10) | 35 | #define IEEE80211_AUTH_TIMEOUT_SHORT (HZ / 10) |
35 | #define IEEE80211_AUTH_MAX_TRIES 3 | 36 | #define IEEE80211_AUTH_MAX_TRIES 3 |
36 | #define IEEE80211_AUTH_WAIT_ASSOC (HZ * 5) | 37 | #define IEEE80211_AUTH_WAIT_ASSOC (HZ * 5) |
37 | #define IEEE80211_ASSOC_TIMEOUT (HZ / 5) | 38 | #define IEEE80211_ASSOC_TIMEOUT (HZ / 5) |
39 | #define IEEE80211_ASSOC_TIMEOUT_LONG (HZ / 2) | ||
38 | #define IEEE80211_ASSOC_TIMEOUT_SHORT (HZ / 10) | 40 | #define IEEE80211_ASSOC_TIMEOUT_SHORT (HZ / 10) |
39 | #define IEEE80211_ASSOC_MAX_TRIES 3 | 41 | #define IEEE80211_ASSOC_MAX_TRIES 3 |
40 | 42 | ||
@@ -3394,10 +3396,13 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata) | |||
3394 | 3396 | ||
3395 | if (tx_flags == 0) { | 3397 | if (tx_flags == 0) { |
3396 | auth_data->timeout = jiffies + IEEE80211_AUTH_TIMEOUT; | 3398 | auth_data->timeout = jiffies + IEEE80211_AUTH_TIMEOUT; |
3397 | ifmgd->auth_data->timeout_started = true; | 3399 | auth_data->timeout_started = true; |
3398 | run_again(sdata, auth_data->timeout); | 3400 | run_again(sdata, auth_data->timeout); |
3399 | } else { | 3401 | } else { |
3400 | auth_data->timeout_started = false; | 3402 | auth_data->timeout = |
3403 | round_jiffies_up(jiffies + IEEE80211_AUTH_TIMEOUT_LONG); | ||
3404 | auth_data->timeout_started = true; | ||
3405 | run_again(sdata, auth_data->timeout); | ||
3401 | } | 3406 | } |
3402 | 3407 | ||
3403 | return 0; | 3408 | return 0; |
@@ -3434,7 +3439,11 @@ static int ieee80211_do_assoc(struct ieee80211_sub_if_data *sdata) | |||
3434 | assoc_data->timeout_started = true; | 3439 | assoc_data->timeout_started = true; |
3435 | run_again(sdata, assoc_data->timeout); | 3440 | run_again(sdata, assoc_data->timeout); |
3436 | } else { | 3441 | } else { |
3437 | assoc_data->timeout_started = false; | 3442 | assoc_data->timeout = |
3443 | round_jiffies_up(jiffies + | ||
3444 | IEEE80211_ASSOC_TIMEOUT_LONG); | ||
3445 | assoc_data->timeout_started = true; | ||
3446 | run_again(sdata, assoc_data->timeout); | ||
3438 | } | 3447 | } |
3439 | 3448 | ||
3440 | return 0; | 3449 | return 0; |