]> bbs.cooldavid.org Git - net-next-2.6.git/commit - drivers/net/wireless/rt2x00/rt2800lib.c
rt2x00: Fix BUG on rt2800usb when trying to read eFuse EEPROM.
authorGertjan van Wingerde <gwingerde@gmail.com>
Sat, 14 Nov 2009 19:20:36 +0000 (20:20 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 16 Nov 2009 19:17:12 +0000 (14:17 -0500)
commit31a4cf1f22677ba1ea90be055bc20aac25b8e7c4
tree8432c39f519d86bff3e2793db7478cd31f59c6c6
parent16475b095a9c952f16e626c142b30bc95cfeadb3
rt2x00: Fix BUG on rt2800usb when trying to read eFuse EEPROM.

Current tree hits a BUG_ON in rt2x00_regbusy_read, because the eFuse EEPROM
reading code of rt2800lib uses the function without the csr_mutex locked.

Fix this by locking the csr_mutex for the of the EEPROM reading cycly and
using the _lock variants of the register reading and writing functions.

This also introcudes the register_read_lock function pointer in the
rt2800_ops structure.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800lib.c
drivers/net/wireless/rt2x00/rt2800lib.h
drivers/net/wireless/rt2x00/rt2800pci.c
drivers/net/wireless/rt2x00/rt2800usb.c