Search Linux Wireless

[PATCH v2] mac80211: fix mlme timeouts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
Reported-by: Luciano Roth Coelho <luciano.coelho@xxxxxxxxx>
Reported-by: Alban Browaeys <prahal@xxxxxxxxx>
---
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;


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux