* [PATCH] mac80211: fix mlme timeouts
@ 2009-07-23 14:05 Johannes Berg
2009-07-23 14:50 ` [PATCH v2] " Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2009-07-23 14:05 UTC (permalink / raw)
To: John Linville; +Cc: Luciano Coelho, Alban Browaeys, linux-wireless
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>
---
This time CC to the list, sorry.
net/mac80211/mlme.c | 3 +++
1 file changed, 3 insertions(+)
--- wireless-testing.orig/net/mac80211/mlme.c 2009-07-23 15:56:48.000000000 +0200
+++ wireless-testing/net/mac80211/mlme.c 2009-07-23 16:03:45.000000000 +0200
@@ -1657,6 +1657,7 @@ static void ieee80211_rx_mgmt_probe_resp
sdata->dev->name);
wk->tries = 0;
wk->state = IEEE80211_MGD_STATE_AUTH;
+ wk->timeout = jiffies; /* run again right away */
WARN_ON(ieee80211_authenticate(sdata, wk) != RX_MGMT_NONE);
}
@@ -2374,6 +2375,7 @@ int ieee80211_mgd_auth(struct ieee80211_
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
@@ -2445,6 +2447,7 @@ int ieee80211_mgd_assoc(struct ieee80211
wk->state = IEEE80211_MGD_STATE_ASSOC;
wk->tries = 0;
+ wk->timeout = jiffies; /* run right away */
if (req->use_mfp) {
ifmgd->mfp = IEEE80211_MFP_REQUIRED;
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v2] mac80211: fix mlme timeouts
2009-07-23 14:05 [PATCH] mac80211: fix mlme timeouts Johannes Berg
@ 2009-07-23 14:50 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2009-07-23 14:50 UTC (permalink / raw)
To: John Linville; +Cc: Luciano Coelho, Alban Browaeys, linux-wireless
Subject: 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>
---
the assignment on probe response is, at least, unnecessary.
net/mac80211/mlme.c | 2 ++
1 file changed, 2 insertions(+)
--- wireless-testing.orig/net/mac80211/mlme.c 2009-07-23 16:04:33.000000000 +0200
+++ wireless-testing/net/mac80211/mlme.c 2009-07-23 16:49:19.000000000 +0200
@@ -2374,6 +2374,7 @@ int ieee80211_mgd_auth(struct ieee80211_
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
@@ -2445,6 +2446,7 @@ int ieee80211_mgd_assoc(struct ieee80211
wk->state = IEEE80211_MGD_STATE_ASSOC;
wk->tries = 0;
+ wk->timeout = jiffies; /* run right away */
if (req->use_mfp) {
ifmgd->mfp = IEEE80211_MFP_REQUIRED;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-23 14:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-23 14:05 [PATCH] mac80211: fix mlme timeouts Johannes Berg
2009-07-23 14:50 ` [PATCH v2] " Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).