linux/drivers
Johannes Berg 07346f81e8 mac80211: proper STA info locking
As discussed earlier, we can unify locking in struct sta_info
and use just a single spinlock protecting all members of the
structure that need protection. Many don't, but one of the
especially bad ones is the 'flags' member that can currently
be clobbered when RX and TX is being processed on different
CPUs at the same time.

Because having four spinlocks for different, mostly exclusive
parts of a single structure is overkill, this patch also kills
the ampdu and mesh plink spinlocks and uses just a single one
for everything. Because none of the spinlocks are nested, this
is safe.

It remains to be seen whether or not we should make the sta
flags use atomic bit operations instead, for now though this
is a safe thing and using atomic operations instead will be
very simple using the new static inline functions this patch
introduces for accessing sta->flags.

Since spin_lock_bh() is used with this lock, there shouldn't
be any contention even if aggregation is enabled at around the
same time as both requires frame transmission/reception which
is in a bh context.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Tomas Winkler <tomasw@gmail.com>
Cc: Ron Rindjunsky <ron.rindjunsky@intel.com>
Cc: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:34 -04:00
..
accessibility Basic braille screen reader support 2008-04-30 08:29:52 -07:00
acorn/char
acpi Fix ACPI vs proc_create_data() mismerge 2008-04-30 16:26:27 -07:00
amba
ata ahci: SB600 ahci can't do MSI, blacklist that capability 2008-04-29 17:42:04 -04:00
atm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-30 08:45:48 -07:00
auxdisplay
base cpu: change cpu_sys_devices from array to per_cpu variable 2008-05-01 08:04:02 -07:00
block Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2008-05-02 11:03:08 -07:00
bluetooth hci_usb.h: fix hard-to-trigger race 2008-05-02 16:45:10 -07:00
cdrom Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2008-04-29 08:18:03 -07:00
char Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2008-05-03 10:01:33 -07:00
clocksource
connector
cpufreq [CPUFREQ] state info wrong after resume 2008-04-28 16:27:08 -04:00
cpuidle
crypto [CRYPTO] padlock-aes: Use generic setkey function 2008-04-21 10:19:34 +08:00
dca
dio
dma DMA engine: typo fixes 2008-04-21 22:38:45 +00:00
edac pasemi_edac needs to include linux/edac.h 2008-04-29 19:06:57 -07:00
eisa
firewire Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-05-02 13:52:35 -07:00
firmware edd: add default mode CONFIG_EDD_OFF=n, override with edd={on,off} 2008-04-29 08:06:23 -07:00
gpio gpio: pca953x: add support for pca9555 I2C I/O expander 2008-05-01 08:04:01 -07:00
hid hid-core: use get_unaligned_* helpers 2008-04-29 08:06:27 -07:00
hwmon Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6 2008-05-01 08:28:26 -07:00
i2c i2c: Convert most new-style drivers to use module aliasing 2008-04-29 23:11:40 +02:00
ide ide: IDE_HFLAG_SERIALIZE_DMA bugfix 2008-05-04 17:03:41 +02:00
ieee1394 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2008-05-01 11:31:38 -07:00
infiniband RDMA/nes: Formatting cleanup 2008-04-29 13:46:54 -07:00
input tty: The big operations rework 2008-04-30 08:29:47 -07:00
isdn isdn: hysdn_procconf.c build fix 2008-05-01 08:03:59 -07:00
leds Remove duplicated unlikely() in IS_ERR() 2008-04-29 08:06:25 -07:00
lguest lguest: make Launcher see device status updates 2008-05-02 21:50:54 +10:00
macintosh [POWERPC] windfarm: Add PowerMac 12,1 support 2008-04-29 15:57:35 +10:00
mca proc: remove proc_root from drivers 2008-04-29 08:06:18 -07:00
md md: support blocking writes to an array on device failure 2008-04-30 08:29:33 -07:00
media fix drivers/media/common/tuners/ build bug 2008-04-30 08:36:04 -07:00
memstick memstick: convert struct class_device to struct device 2008-04-19 19:10:29 -07:00
message Remove duplicated unlikely() in IS_ERR() 2008-04-29 08:06:25 -07:00
mfd drivers: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:53 -07:00
misc Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2008-04-30 11:52:52 -07:00
mmc Merge master.kernel.org:/home/rmk/linux-2.6-arm 2008-04-29 15:18:06 -07:00
mtd Merge git://git.infradead.org/mtd-2.6 2008-05-01 11:15:28 -07:00
net mac80211: proper STA info locking 2008-05-14 16:29:34 -04:00
nubus proc: convert /proc/bus/nubus to seq_file interface 2008-04-29 08:06:19 -07:00
of [POWERPC] drivers/of/of_i2c.c: Add MODULE_LICENSE 2008-04-24 20:58:01 +10:00
oprofile oprofile: change cpu_buffer from array to per_cpu variable 2008-04-28 08:58:31 -07:00
parisc parisc: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00
parport debugobjects: add timer specific object debugging code 2008-04-30 08:29:53 -07:00
pci Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-04-29 10:17:59 -07:00
pcmcia pcmcia: replace remaining __FUNCTION__ occurrences 2008-05-01 08:04:00 -07:00
pnp PNP: fix printk format warnings 2008-05-01 08:04:00 -07:00
power Merge git://git.infradead.org/battery-2.6 2008-05-03 10:57:57 -07:00
ps3 [POWERPC] PS3: Remove unsupported wakeup sources 2008-05-02 15:00:44 +10:00
rapidio [RAPIDIO] Auto-probe the RapidIO system size 2008-04-29 19:40:28 +10:00
rtc Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2008-04-30 11:52:52 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-05-02 13:52:35 -07:00
sbus drivers: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:53 -07:00
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-05-02 13:52:35 -07:00
serial Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 2008-05-03 10:05:11 -07:00
sh
sn
spi spi_s3c24xx signedness fix 2008-05-01 08:04:01 -07:00
ssb ssb: Allow reading of 440-byte SPROM that is not rev 4 2008-05-07 15:02:12 -04:00
tc
telephony
thermal thermal: re-name thermal.c to thermal_sys.c 2008-04-29 03:12:17 -04:00
uio UIO: hold a reference to the device's owner while the device is open 2008-04-19 19:10:18 -07:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-05-02 13:52:35 -07:00
video pxafb: preliminary smart panel interface support (update) 2008-04-30 08:29:32 -07:00
virtio virtio: explicit advertisement of driver features 2008-05-02 21:50:50 +10:00
w1 drivers: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:53 -07:00
watchdog Convert asm/semaphore.h users to linux/semaphore.h 2008-04-18 22:22:54 -04:00
xen xen: add balloon driver 2008-04-24 23:57:33 +02:00
zorro zorro: use non-racy method for proc entries creation 2008-04-29 08:06:21 -07:00
Kconfig Basic braille screen reader support 2008-04-30 08:29:52 -07:00
Makefile Basic braille screen reader support 2008-04-30 08:29:52 -07:00