]> git.hungrycats.org Git - linux/commit
mac80211: fix station destruction in AP/mesh modes
authorJohannes Berg <johannes.berg@intel.com>
Thu, 13 Dec 2012 21:54:58 +0000 (22:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:46:36 +0000 (08:46 -0800)
commit52beb077553228824002fc77b701ff632423860c
treed7e3b8a4ffb5c2cf32fb522ab4e4934cc90fbc85
parent1cf18948040a40fa4497e40bcde2ffa8d6b1196e
mac80211: fix station destruction in AP/mesh modes

commit 97f97b1f5fe0878b35c8e314f98591771696321b upstream.

Unfortunately, commit b22cfcfcae5b, intended to speed up roaming
by avoiding the synchronize_rcu() broke AP/mesh modes as it moved
some code into that work item that will still call into the driver
at a time where it's no longer expected to handle this: after the
AP or mesh has been stopped.

To fix this problem remove the per-station work struct, maintain a
station cleanup list instead and flush this list when stations are
flushed. To keep this patch smaller for stable, do this when the
stations are flushed (sta_info_flush()). This unfortunately brings
back the original roaming delay; I'll fix that again in a separate
patch.

Also, Ben reported that the original commit could sometimes (with
many interfaces) cause long delays when an interface is set down,
due to blocking on flush_workqueue(). Since we now maintain the
cleanup list, this particular change of the original patch can be
reverted.

Reported-by: Ben Greear <greearb@candelatech.com>
Tested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/ieee80211_i.h
net/mac80211/iface.c
net/mac80211/sta_info.c
net/mac80211/sta_info.h