dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/net/mac80211
Johannes Berg 58905ca5b1 mac80211: fix scan channel race
When a software scan starts, it first sets sw_scanning, but
leaves the scan_channel "unset" (it currently actually gets
initialised to a default). Now, when something else tries
to (re)configure the hardware in the window between these two
events (after sw_scanning = true, but before scan_channel is
set), the current code switches to the (unset!) scan_channel.
This causes trouble, especially when switching bands and
sending frames on the wrong channel.

To work around this, leave scan_channel initialised to NULL
and use it to determine whether or not a switch to a different
channel should occur (and also use the same condition to check
whether to adjust power for scan or not).

Additionally, avoid reconfiguring the hardware completely when
recalculating idle resulted in no changes, this was the problem
that originally led us to discover the race condition in the
first place, which was helpfully bisected by Pavel. This part
of the patch should not be necessary with the other fixes, but
not calling the ieee80211_hw_config function when we know it to
be unnecessary is certainly a correct thing to do.

Unfortunately, this patch cannot and does not fix the race
condition completely, but due to the way the scan code is
structured it makes the particular problem Pavel discovered
(race while changing channel at the same time as transmitting
frames) go away. To fix it completely, more work especially
with locking configuration is needed.

Bisected-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-11 15:23:54 -04:00
..
Kconfig mac80211: enable PS by default 2009-04-22 16:57:16 -04:00
Makefile
aes_ccm.c
aes_ccm.h
aes_cmac.c
aes_cmac.h
agg-rx.c mac80211: Add a timeout for frames in the RX reorder buffer 2009-05-06 15:15:04 -04:00
agg-tx.c mac80211: add driver ops wrappers 2009-05-06 15:14:37 -04:00
cfg.c nl80211 : Add support for configuring MFP 2009-05-11 15:23:54 -04:00
cfg.h
debugfs.c mac80211: add driver ops wrappers 2009-05-06 15:14:37 -04:00
debugfs.h
debugfs_key.c
debugfs_key.h
debugfs_netdev.c
debugfs_netdev.h
debugfs_sta.c
debugfs_sta.h
driver-ops.h mac80211: add driver ops wrappers 2009-05-06 15:14:37 -04:00
event.c nl80211: Add Michael MIC failure event 2009-04-22 16:54:28 -04:00
ht.c cfg80211: clean up includes 2009-04-22 16:57:17 -04:00
ibss.c mac80211: tell driver when idle 2009-05-06 15:14:51 -04:00
ieee80211_i.h mac80211: tell driver when idle 2009-05-06 15:14:51 -04:00
iface.c mac80211: fix scan channel race 2009-05-11 15:23:54 -04:00
key.c mac80211: add driver ops wrappers 2009-05-06 15:14:37 -04:00
key.h
led.c
led.h
main.c mac80211: fix scan channel race 2009-05-11 15:23:54 -04:00
mesh.c mac80211: unify config_interface and bss_info_changed 2009-05-06 15:14:36 -04:00
mesh.h
mesh_hwmp.c
mesh_pathtbl.c
mesh_plink.c
michael.c
michael.h
mlme.c mac80211: Fix sparse warning for ssid_len on ieee80211_sta_config_auth() 2009-05-06 15:15:04 -04:00
pm.c mac80211: add driver ops wrappers 2009-05-06 15:14:37 -04:00
rate.c mac80211: rate control status only for controlled packets 2009-03-27 20:13:15 -04:00
rate.h mac80211: rate control status only for controlled packets 2009-03-27 20:13:15 -04:00
rc80211_minstrel.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-05-08 12:46:17 -07:00
rc80211_minstrel.h
rc80211_minstrel_debugfs.c
rc80211_pid.h
rc80211_pid_algo.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-05-08 12:46:17 -07:00
rc80211_pid_debugfs.c
rx.c mac80211: Comment the order of HT RX reorder handler vs. RX handlers 2009-05-06 15:15:05 -04:00
scan.c mac80211: fix scan channel race 2009-05-11 15:23:54 -04:00
spectmgmt.c cfg80211: clean up includes 2009-04-22 16:57:17 -04:00
sta_info.c mac80211: add driver ops wrappers 2009-05-06 15:14:37 -04:00
sta_info.h mac80211: Add a timeout for frames in the RX reorder buffer 2009-05-06 15:15:04 -04:00
tkip.c mac80211: add driver ops wrappers 2009-05-06 15:14:37 -04:00
tkip.h
tx.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-05-08 12:46:17 -07:00
util.c mac80211: add driver ops wrappers 2009-05-06 15:14:37 -04:00
wep.c mac80211: rewrite fragmentation 2009-03-27 20:13:21 -04:00
wep.h
wext.c mac80211: report operating frequency rather than current 2009-05-06 15:15:02 -04:00
wme.c
wme.h
wpa.c nl80211: Add Michael MIC failure event 2009-04-22 16:54:28 -04:00
wpa.h