aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-23 10:50:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-27 15:24:18 -0400
commit485318471e85c1ddb5e3056fa30fdbbc46d759c6 (patch)
treed8c4930050a27edd958812dc18f8d18c6234ed80
parent09f97e0fc4ae81f151bd76b97e28d2af429c1427 (diff)
mac80211: fix mlme timeouts
When a new MLME work is created, its timeout is initialised to 0. This is wrong, it could then be thought of as having an actual timeout in the future (time_is_after_jiffies() can return true). Instead, it should be initialised to jiffies so that it will run right away as soon as the mlme work is executed. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Reported-by: Luciano Roth Coelho <luciano.coelho@nokia.com> Reported-by: Alban Browaeys <prahal@yahoo.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/mlme.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 52b6f8327a5b..807ab89bdad9 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2377,6 +2377,7 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
2377 2377
2378 wk->state = IEEE80211_MGD_STATE_PROBE; 2378 wk->state = IEEE80211_MGD_STATE_PROBE;
2379 wk->auth_alg = auth_alg; 2379 wk->auth_alg = auth_alg;
2380 wk->timeout = jiffies; /* run right away */
2380 2381
2381 /* 2382 /*
2382 * XXX: if still associated need to tell AP that we're going 2383 * XXX: if still associated need to tell AP that we're going
@@ -2448,6 +2449,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
2448 2449
2449 wk->state = IEEE80211_MGD_STATE_ASSOC; 2450 wk->state = IEEE80211_MGD_STATE_ASSOC;
2450 wk->tries = 0; 2451 wk->tries = 0;
2452 wk->timeout = jiffies; /* run right away */
2451 2453
2452 if (req->use_mfp) { 2454 if (req->use_mfp) {
2453 ifmgd->mfp = IEEE80211_MFP_REQUIRED; 2455 ifmgd->mfp = IEEE80211_MFP_REQUIRED;