aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500pci.c
diff options
context:
space:
mode:
authorGertjan van Wingerde <gwingerde@gmail.com>2010-02-13 14:55:49 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-02-15 16:14:11 -0500
commit49e721ec6ca74f90ee99089ad2de1c338a95c6d5 (patch)
tree203bd5d436af015599f083bcb447e0ee03c91654 /drivers/net/wireless/rt2x00/rt2500pci.c
parent714fa6636331d33c6045efe394f36c964a6c14ee (diff)
rt2x00: rework RT chipset and revision determination for PCI an SOC devices.
The recent rt2800 devices are no longer really identified by their PCI ID's, but rather by the contents of their CSR0 register. Also for the other chipsets is the contents of this CSR0 register important. Change the chipset determination logic to be more aligned with the rt2800 model. Preparation for the support of rt3070 / rt3090 based devices. 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/rt2500pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index 0f6d001267ac..c71266142ae9 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1490,7 +1490,6 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
1490static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev) 1490static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
1491{ 1491{
1492 u32 reg; 1492 u32 reg;
1493 u16 chip;
1494 u16 value; 1493 u16 value;
1495 u16 eeprom; 1494 u16 eeprom;
1496 1495
@@ -1500,16 +1499,12 @@ static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
1500 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &eeprom); 1499 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &eeprom);
1501 1500
1502 /* 1501 /*
1503 * Identify RT chipset.
1504 */
1505 pci_read_config_word(to_pci_dev(rt2x00dev->dev), PCI_DEVICE_ID, &chip);
1506
1507 /*
1508 * Identify RF chipset. 1502 * Identify RF chipset.
1509 */ 1503 */
1510 value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE); 1504 value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE);
1511 rt2x00pci_register_read(rt2x00dev, CSR0, &reg); 1505 rt2x00pci_register_read(rt2x00dev, CSR0, &reg);
1512 rt2x00_set_chip(rt2x00dev, chip, value, reg); 1506 rt2x00_set_chip(rt2x00dev, RT2560, value,
1507 rt2x00_get_field32(reg, CSR0_REVISION));
1513 1508
1514 if (!rt2x00_rf(rt2x00dev, RF2522) && 1509 if (!rt2x00_rf(rt2x00dev, RF2522) &&
1515 !rt2x00_rf(rt2x00dev, RF2523) && 1510 !rt2x00_rf(rt2x00dev, RF2523) &&