diff options
author | Gertjan van Wingerde <gwingerde@gmail.com> | 2009-11-14 14:20:36 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-16 14:17:12 -0500 |
commit | 31a4cf1f22677ba1ea90be055bc20aac25b8e7c4 (patch) | |
tree | 8432c39f519d86bff3e2793db7478cd31f59c6c6 /drivers/net/wireless/rt2x00/rt2800pci.c | |
parent | 16475b095a9c952f16e626c142b30bc95cfeadb3 (diff) |
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>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index c7a596f2da39..87a5094ae953 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -1089,6 +1089,7 @@ static int rt2800pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1089 | 1089 | ||
1090 | static const struct rt2800_ops rt2800pci_rt2800_ops = { | 1090 | static const struct rt2800_ops rt2800pci_rt2800_ops = { |
1091 | .register_read = rt2x00pci_register_read, | 1091 | .register_read = rt2x00pci_register_read, |
1092 | .register_read_lock = rt2x00pci_register_read, /* same for PCI */ | ||
1092 | .register_write = rt2x00pci_register_write, | 1093 | .register_write = rt2x00pci_register_write, |
1093 | .register_write_lock = rt2x00pci_register_write, /* same for PCI */ | 1094 | .register_write_lock = rt2x00pci_register_write, /* same for PCI */ |
1094 | 1095 | ||