Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27df2a9c authored by Ivo van Doorn's avatar Ivo van Doorn Committed by John W. Linville
Browse files

rt2x00: Rename CONFIG_DISABLE_LINK_TUNING



Rename CONFIG_DISABLE_LINK_TUNING to DRIVER_SUPPORT_LINK_TUNING
Link tuning support is not only based on EEPROM decisions, but
also if the device actually supports it.

Currently only rt2500usb doesn't support link tuning because
of hardware problems. But rt2800usb is also suspected of having
problems with link tuning.

Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 74861922
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1399,8 +1399,8 @@ static int rt2400pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
	/*
	/*
	 * Check if the BBP tuning should be enabled.
	 * Check if the BBP tuning should be enabled.
	 */
	 */
	if (!rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RX_AGCVGC_TUNING))
	if (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RX_AGCVGC_TUNING))
		__set_bit(CONFIG_DISABLE_LINK_TUNING, &rt2x00dev->flags);
		__set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags);


	return 0;
	return 0;
}
}
+2 −3
Original line number Original line Diff line number Diff line
@@ -1557,9 +1557,8 @@ static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
	 * Check if the BBP tuning should be enabled.
	 * Check if the BBP tuning should be enabled.
	 */
	 */
	rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &eeprom);
	rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &eeprom);

	if (!rt2x00_get_field16(eeprom, EEPROM_NIC_DYN_BBP_TUNE))
	if (rt2x00_get_field16(eeprom, EEPROM_NIC_DYN_BBP_TUNE))
		__set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags);
		__set_bit(CONFIG_DISABLE_LINK_TUNING, &rt2x00dev->flags);


	/*
	/*
	 * Read the RSSI <-> dBm offset information.
	 * Read the RSSI <-> dBm offset information.
+0 −8
Original line number Original line Diff line number Diff line
@@ -1470,13 +1470,6 @@ static int rt2500usb_init_eeprom(struct rt2x00_dev *rt2x00dev)
	if (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_HARDWARE_RADIO))
	if (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_HARDWARE_RADIO))
		__set_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags);
		__set_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags);


	/*
	 * Check if the BBP tuning should be disabled.
	 */
	rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &eeprom);
	if (rt2x00_get_field16(eeprom, EEPROM_NIC_DYN_BBP_TUNE))
		__set_bit(CONFIG_DISABLE_LINK_TUNING, &rt2x00dev->flags);

	/*
	/*
	 * Read the RSSI <-> dBm offset information.
	 * Read the RSSI <-> dBm offset information.
	 */
	 */
@@ -1743,7 +1736,6 @@ static int rt2500usb_probe_hw(struct rt2x00_dev *rt2x00dev)
		__set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
		__set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
		__set_bit(DRIVER_REQUIRE_COPY_IV, &rt2x00dev->flags);
		__set_bit(DRIVER_REQUIRE_COPY_IV, &rt2x00dev->flags);
	}
	}
	__set_bit(CONFIG_DISABLE_LINK_TUNING, &rt2x00dev->flags);


	/*
	/*
	 * Set the rssi offset.
	 * Set the rssi offset.
+1 −0
Original line number Original line Diff line number Diff line
@@ -1037,6 +1037,7 @@ static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev)
	__set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags);
	__set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags);
	if (!modparam_nohwcrypt)
	if (!modparam_nohwcrypt)
		__set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
		__set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
	__set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags);


	/*
	/*
	 * Set the rssi offset.
	 * Set the rssi offset.
+1 −0
Original line number Original line Diff line number Diff line
@@ -632,6 +632,7 @@ static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev)
	__set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags);
	__set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags);
	if (!modparam_nohwcrypt)
	if (!modparam_nohwcrypt)
		__set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
		__set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
	__set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags);


	/*
	/*
	 * Set the rssi offset.
	 * Set the rssi offset.
Loading