diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2010-07-11 06:24:22 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-12 16:05:33 -0400 |
commit | 27df2a9ce9ea6a77b9959cf5cc03ee85324aced9 (patch) | |
tree | 703d9320ac1d6c17cb8e41152356defc26d89517 | |
parent | 748619220651a33c260ed6c0a7648e69324edd74 (diff) |
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: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00link.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 1 |
9 files changed, 13 insertions, 17 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index 3bedf566c8ee..5d5047fa0a26 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1399,8 +1399,8 @@ static int rt2400pci_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1399 | /* | 1399 | /* |
1400 | * Check if the BBP tuning should be enabled. | 1400 | * Check if the BBP tuning should be enabled. |
1401 | */ | 1401 | */ |
1402 | if (!rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RX_AGCVGC_TUNING)) | 1402 | if (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RX_AGCVGC_TUNING)) |
1403 | __set_bit(CONFIG_DISABLE_LINK_TUNING, &rt2x00dev->flags); | 1403 | __set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags); |
1404 | 1404 | ||
1405 | return 0; | 1405 | return 0; |
1406 | } | 1406 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 69d231d83952..1d4758ac1311 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1557,9 +1557,8 @@ static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1557 | * Check if the BBP tuning should be enabled. | 1557 | * Check if the BBP tuning should be enabled. |
1558 | */ | 1558 | */ |
1559 | rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &eeprom); | 1559 | rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &eeprom); |
1560 | 1560 | if (!rt2x00_get_field16(eeprom, EEPROM_NIC_DYN_BBP_TUNE)) | |
1561 | if (rt2x00_get_field16(eeprom, EEPROM_NIC_DYN_BBP_TUNE)) | 1561 | __set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags); |
1562 | __set_bit(CONFIG_DISABLE_LINK_TUNING, &rt2x00dev->flags); | ||
1563 | 1562 | ||
1564 | /* | 1563 | /* |
1565 | * Read the RSSI <-> dBm offset information. | 1564 | * Read the RSSI <-> dBm offset information. |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 44205526013f..6e48a15af4c5 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1471,13 +1471,6 @@ static int rt2500usb_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1471 | __set_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags); | 1471 | __set_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags); |
1472 | 1472 | ||
1473 | /* | 1473 | /* |
1474 | * Check if the BBP tuning should be disabled. | ||
1475 | */ | ||
1476 | rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &eeprom); | ||
1477 | if (rt2x00_get_field16(eeprom, EEPROM_NIC_DYN_BBP_TUNE)) | ||
1478 | __set_bit(CONFIG_DISABLE_LINK_TUNING, &rt2x00dev->flags); | ||
1479 | |||
1480 | /* | ||
1481 | * Read the RSSI <-> dBm offset information. | 1474 | * Read the RSSI <-> dBm offset information. |
1482 | */ | 1475 | */ |
1483 | rt2x00_eeprom_read(rt2x00dev, EEPROM_CALIBRATE_OFFSET, &eeprom); | 1476 | rt2x00_eeprom_read(rt2x00dev, EEPROM_CALIBRATE_OFFSET, &eeprom); |
@@ -1743,7 +1736,6 @@ static int rt2500usb_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
1743 | __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); | 1736 | __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); |
1744 | __set_bit(DRIVER_REQUIRE_COPY_IV, &rt2x00dev->flags); | 1737 | __set_bit(DRIVER_REQUIRE_COPY_IV, &rt2x00dev->flags); |
1745 | } | 1738 | } |
1746 | __set_bit(CONFIG_DISABLE_LINK_TUNING, &rt2x00dev->flags); | ||
1747 | 1739 | ||
1748 | /* | 1740 | /* |
1749 | * Set the rssi offset. | 1741 | * Set the rssi offset. |
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index faf71e2aeb64..a9eca99d416c 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -1037,6 +1037,7 @@ static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
1037 | __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags); | 1037 | __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags); |
1038 | if (!modparam_nohwcrypt) | 1038 | if (!modparam_nohwcrypt) |
1039 | __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); | 1039 | __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); |
1040 | __set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags); | ||
1040 | 1041 | ||
1041 | /* | 1042 | /* |
1042 | * Set the rssi offset. | 1043 | * Set the rssi offset. |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index f2cd37e5aea8..e4ab4db66ca0 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -632,6 +632,7 @@ static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
632 | __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags); | 632 | __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags); |
633 | if (!modparam_nohwcrypt) | 633 | if (!modparam_nohwcrypt) |
634 | __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); | 634 | __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); |
635 | __set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags); | ||
635 | 636 | ||
636 | /* | 637 | /* |
637 | * Set the rssi offset. | 638 | * Set the rssi offset. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 788b0e452cc7..42f466163278 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -646,6 +646,7 @@ enum rt2x00_flags { | |||
646 | CONFIG_SUPPORT_HW_CRYPTO, | 646 | CONFIG_SUPPORT_HW_CRYPTO, |
647 | DRIVER_SUPPORT_CONTROL_FILTERS, | 647 | DRIVER_SUPPORT_CONTROL_FILTERS, |
648 | DRIVER_SUPPORT_CONTROL_FILTER_PSPOLL, | 648 | DRIVER_SUPPORT_CONTROL_FILTER_PSPOLL, |
649 | DRIVER_SUPPORT_LINK_TUNING, | ||
649 | 650 | ||
650 | /* | 651 | /* |
651 | * Driver configuration | 652 | * Driver configuration |
@@ -655,7 +656,6 @@ enum rt2x00_flags { | |||
655 | CONFIG_EXTERNAL_LNA_A, | 656 | CONFIG_EXTERNAL_LNA_A, |
656 | CONFIG_EXTERNAL_LNA_BG, | 657 | CONFIG_EXTERNAL_LNA_BG, |
657 | CONFIG_DOUBLE_ANTENNA, | 658 | CONFIG_DOUBLE_ANTENNA, |
658 | CONFIG_DISABLE_LINK_TUNING, | ||
659 | CONFIG_CHANNEL_HT40, | 659 | CONFIG_CHANNEL_HT40, |
660 | }; | 660 | }; |
661 | 661 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00link.c b/drivers/net/wireless/rt2x00/rt2x00link.c index 2f8136cab7d8..801925bb157f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00link.c +++ b/drivers/net/wireless/rt2x00/rt2x00link.c | |||
@@ -359,10 +359,11 @@ static void rt2x00link_tuner(struct work_struct *work) | |||
359 | qual->rssi = link->avg_rssi.avg; | 359 | qual->rssi = link->avg_rssi.avg; |
360 | 360 | ||
361 | /* | 361 | /* |
362 | * Only perform the link tuning when Link tuning | 362 | * Check if link tuning is supported by the hardware, some hardware |
363 | * has been enabled (This could have been disabled from the EEPROM). | 363 | * do not support link tuning at all, while other devices can disable |
364 | * the feature from the EEPROM. | ||
364 | */ | 365 | */ |
365 | if (!test_bit(CONFIG_DISABLE_LINK_TUNING, &rt2x00dev->flags)) | 366 | if (test_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags)) |
366 | rt2x00dev->ops->lib->link_tuner(rt2x00dev, qual, link->count); | 367 | rt2x00dev->ops->lib->link_tuner(rt2x00dev, qual, link->count); |
367 | 368 | ||
368 | /* | 369 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 0123fbc22ca2..ee84536fb9f0 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -2690,6 +2690,7 @@ static int rt61pci_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
2690 | __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags); | 2690 | __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags); |
2691 | if (!modparam_nohwcrypt) | 2691 | if (!modparam_nohwcrypt) |
2692 | __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); | 2692 | __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); |
2693 | __set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags); | ||
2693 | 2694 | ||
2694 | /* | 2695 | /* |
2695 | * Set the rssi offset. | 2696 | * Set the rssi offset. |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 286dd97e51d8..156f5d366013 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -2135,6 +2135,7 @@ static int rt73usb_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
2135 | __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags); | 2135 | __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags); |
2136 | if (!modparam_nohwcrypt) | 2136 | if (!modparam_nohwcrypt) |
2137 | __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); | 2137 | __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); |
2138 | __set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags); | ||
2138 | 2139 | ||
2139 | /* | 2140 | /* |
2140 | * Set the rssi offset. | 2141 | * Set the rssi offset. |