/*
 * Device probe functions.
 */
static void rt2800pci_read_eeprom(struct rt2x00_dev *rt2x00dev)
{
    if (rt2x00_is_soc(rt2x00dev) ||
            test_bit(REQUIRE_EEPROM_FILE, &rt2x00dev->cap_flags))
        rt2800pci_read_eeprom_file(rt2x00dev);
    else if (rt2800pci_efuse_detect(rt2x00dev))
        rt2800pci_read_eeprom_efuse(rt2x00dev);
    else
        rt2800pci_read_eeprom_pci(rt2x00dev);
}
/*
 * Device probe functions.
 */
static int rt2800pci_read_eeprom(struct rt2x00_dev *rt2x00dev)
{
	int retval;

	if (rt2800pci_efuse_detect(rt2x00dev))
		retval = rt2800pci_read_eeprom_efuse(rt2x00dev);
	else
		retval = rt2800pci_read_eeprom_pci(rt2x00dev);

	return retval;
}
/*
 * Device probe functions.
 */
static int rt2800pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
{
	/*
	 * Read EEPROM into buffer
	 */
	if (rt2x00_is_soc(rt2x00dev))
		rt2800pci_read_eeprom_soc(rt2x00dev);
	else if (rt2800pci_efuse_detect(rt2x00dev))
		rt2800pci_read_eeprom_efuse(rt2x00dev);
	else
		rt2800pci_read_eeprom_pci(rt2x00dev);

	return rt2800_validate_eeprom(rt2x00dev);
}
Exemple #4
0
/*
 * Device probe functions.
 */
static int rt2800pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
{
	/*
	 * Read EEPROM into buffer
	 */
	if (rt2x00_is_soc(rt2x00dev) ||
			test_bit(REQUIRE_EEPROM_FILE, &rt2x00dev->cap_flags))
		rt2800pci_read_eeprom_file(rt2x00dev);
	else if (rt2800pci_efuse_detect(rt2x00dev))
		rt2800pci_read_eeprom_efuse(rt2x00dev);
	else
		rt2800pci_read_eeprom_pci(rt2x00dev);

	return rt2800_validate_eeprom(rt2x00dev);
}
/*
 * Device probe functions.
 */
static int rt2800pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
{
	/*
	 * Read EEPROM into buffer
	 */
	switch (rt2x00dev->chip.rt) {
	case RT2880:
	case RT3052:
		rt2800pci_read_eeprom_soc(rt2x00dev);
		break;
	default:
		if (rt2800pci_efuse_detect(rt2x00dev))
			rt2800pci_read_eeprom_efuse(rt2x00dev);
		else
			rt2800pci_read_eeprom_pci(rt2x00dev);
		break;
	}

	return rt2800_validate_eeprom(rt2x00dev);
}