diff options
author | Gertjan van Wingerde <gwingerde@gmail.com> | 2010-06-29 15:44:18 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-30 15:00:51 -0400 |
commit | 20f8b139a3834db1545454b4392aa73dcf595c9f (patch) | |
tree | 4abc8f0b4e72fbd0fe593cc22924f8ae65795208 /drivers/net/wireless/rt2x00/rt2800pci.c | |
parent | afd2a5ca1ef6ffe1f9fd0846ae39795527ead555 (diff) |
rt2x00: Correctly detect 93C86 EEPROMs in rt2800pci.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-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 | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 0af53bdb5c74..b48b9494845e 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -139,8 +139,18 @@ static void rt2800pci_read_eeprom_pci(struct rt2x00_dev *rt2x00dev) | |||
139 | eeprom.data = rt2x00dev; | 139 | eeprom.data = rt2x00dev; |
140 | eeprom.register_read = rt2800pci_eepromregister_read; | 140 | eeprom.register_read = rt2800pci_eepromregister_read; |
141 | eeprom.register_write = rt2800pci_eepromregister_write; | 141 | eeprom.register_write = rt2800pci_eepromregister_write; |
142 | eeprom.width = !rt2x00_get_field32(reg, E2PROM_CSR_TYPE) ? | 142 | switch (rt2x00_get_field32(reg, E2PROM_CSR_TYPE)) |
143 | PCI_EEPROM_WIDTH_93C46 : PCI_EEPROM_WIDTH_93C66; | 143 | { |
144 | case 0: | ||
145 | eeprom.width = PCI_EEPROM_WIDTH_93C46; | ||
146 | break; | ||
147 | case 1: | ||
148 | eeprom.width = PCI_EEPROM_WIDTH_93C66; | ||
149 | break; | ||
150 | default: | ||
151 | eeprom.width = PCI_EEPROM_WIDTH_93C86; | ||
152 | break; | ||
153 | } | ||
144 | eeprom.reg_data_in = 0; | 154 | eeprom.reg_data_in = 0; |
145 | eeprom.reg_data_out = 0; | 155 | eeprom.reg_data_out = 0; |
146 | eeprom.reg_data_clock = 0; | 156 | eeprom.reg_data_clock = 0; |