]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/net/wireless/rt2x00/rt2500usb.c
rt2x00: Fix race conditions in flag handling
authorIvo van Doorn <ivdoorn@gmail.com>
Fri, 29 Aug 2008 19:04:26 +0000 (21:04 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 29 Aug 2008 20:24:11 +0000 (16:24 -0400)
commit0262ab0df64a67d4c0ed7577a29b7d866819cc68
tree95c5e7842787c60140fe6c35ff7a1bc8b43bebaf
parentde9cc7a4e6f975ca5e91cf8745b3e35a7e780bae
rt2x00: Fix race conditions in flag handling

Some of the flags should be accessed atomically to
prevent race conditions. The flags that are most important
are those that can change often and indicate the actual
state of the device, queue or queue entry.

The big flag rename was done to move all state flags to
the same naming type as the other rt2x00dev flags and
made sure all places where the flags were used were changed. ;)

Thanks to Stephen for most of the queue flags updates,
which fixes some of the most obvious consequences of the
race conditions. Among those the notorious:

rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0.
rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0.
rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0.

Signed-off-by: Stephen Blackheath <tramp.enshrine.stephen@blacksapphire.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2400pci.c
drivers/net/wireless/rt2x00/rt2500pci.c
drivers/net/wireless/rt2x00/rt2500usb.c
drivers/net/wireless/rt2x00/rt2x00.h
drivers/net/wireless/rt2x00/rt2x00config.c
drivers/net/wireless/rt2x00/rt2x00dev.c
drivers/net/wireless/rt2x00/rt2x00mac.c
drivers/net/wireless/rt2x00/rt2x00queue.c
drivers/net/wireless/rt2x00/rt2x00rfkill.c
drivers/net/wireless/rt2x00/rt2x00usb.c
drivers/net/wireless/rt2x00/rt61pci.c