]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: fix resume
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 19 Nov 2009 13:29:39 +0000 (14:29 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 19 Nov 2009 16:08:39 +0000 (11:08 -0500)
commit427334180e24f927a6a38f1beacc342477efde3a
tree443cdf6d6fffab53db16006e44fd6506d814fd86
parent622406f7c1dae40766b75cf6ea13987a94686b87
mac80211: fix resume

When mac80211 resumes, it currently first sets suspended
to false so the driver can start doing things and we can
receive frames.

However, if we actually receive frames then it can end
up starting some work which adds timers and then later
runs into a BUG_ON in the timer code because it tries
add_timer() on a pending timer.

Fix this by keeping track of the resuming process by
introducing a new variable 'resuming' which gets set to
true early on instead of setting 'suspended' to false,
and allow queueing work but not receiving frames while
resuming.

Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ieee80211_i.h
net/mac80211/util.c