]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: fix scan races and rework scanning
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 23 Apr 2009 14:01:47 +0000 (16:01 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 6 May 2009 19:14:31 +0000 (15:14 -0400)
commitcaff6d5986f01dd01408a3edcea0472c4ea596b8
tree899a804545850c7e1b1e3eea5c743df2c8cddf3d
parent80f83c3a1c324598e7001b9768aafde395e5ef24
mac80211: fix scan races and rework scanning

There are some places marked
/* XXX maybe racy? */
and they really are racy because there's no locking.

This patch reworks much of the scan code, and introduces proper
locking for the scan request as well as the internal scanning
(which is necessary for IBSS/managed modes). Helper functions
are added to call the scanning code whenever necessary. The
scan deferring is changed to simply queue the scanning work
instead of trying to start the scan in place, the scanning work
will then take care of the rest.

Also, currently when internal scans are requested for an interface
that is trying to associate, we reject such scans. This was not
intended, the mlme code has provisions to scan twice when it can't
find the BSS to associate with right away; this has never worked
properly. Fix this by not rejecting internal scan requests for an
interface that is associating.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ibss.c
net/mac80211/ieee80211_i.h
net/mac80211/main.c
net/mac80211/mlme.c
net/mac80211/scan.c