Skip to content

Commit

Permalink
mac80211: fix mlme timeouts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 27, 2009
1 parent 09f97e0 commit 4853184
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -2377,6 +2377,7 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,

wk->state = IEEE80211_MGD_STATE_PROBE;
wk->auth_alg = auth_alg;
wk->timeout = jiffies; /* run right away */

/*
* XXX: if still associated need to tell AP that we're going
Expand Down Expand Up @@ -2448,6 +2449,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,

wk->state = IEEE80211_MGD_STATE_ASSOC;
wk->tries = 0;
wk->timeout = jiffies; /* run right away */

if (req->use_mfp) {
ifmgd->mfp = IEEE80211_MFP_REQUIRED;
Expand Down

0 comments on commit 4853184

Please sign in to comment.