From: Johannes Berg Date: Thu, 23 Jul 2009 14:50:16 +0000 (+0200) Subject: mac80211: fix mlme timeouts X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=485318471e85c1ddb5e3056fa30fdbbc46d759c6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Reported-by: Luciano Roth Coelho Reported-by: Alban Browaeys Signed-off-by: John W. Linville --- 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, 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 @@ -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;