diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-05 22:37:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-05 22:37:42 -0400 |
commit | e63e03273b89f7248baa56cf242474f661e776e1 (patch) | |
tree | 7e0a000ed3b252849b9002306ba479074c165330 /drivers/net/wireless/rt2x00/rt2500usb.c | |
parent | 37193fb4639fa94f91cbbab1e8aca596300e1d94 (diff) | |
parent | ffb208479bd62ab26c29a242faeb1de1c6d5fcdc (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (78 commits)
AX.25: Fix sysctl registration if !CONFIG_AX25_DAMA_SLAVE
pktgen: mac count
pktgen: random flow
bridge: Eliminate unnecessary forward delay
bridge: fix compile warning in net/bridge/br_netfilter.c
ipv4: remove unused field in struct flowi (include/net/flow.h).
tg3: Fix 'scheduling while atomic' errors
net: Kill plain NET_XMIT_BYPASS.
net_sched: Add qdisc __NET_XMIT_BYPASS flag
net_sched: Add qdisc __NET_XMIT_STOLEN flag
iwl3945: fix merge mistake for packet injection
iwlwifi: grap nic access before accessing periphery registers
iwlwifi: decrement rx skb counter in scan abort handler
iwlwifi: fix unhandled interrupt when HW rfkill is on
iwlwifi: implement iwl5000_calc_rssi
iwlwifi: memory allocation optimization
iwlwifi: HW bug fixes
p54: Fix potential concurrent access to private data
rt2x00: Disable link tuning in rt2500usb
iwlwifi: Don't use buffer allocated on the stack for led names
...
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 3078417b326b..cd5af656932d 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -633,6 +633,16 @@ static void rt2500usb_reset_tuner(struct rt2x00_dev *rt2x00dev) | |||
633 | rt2x00dev->link.vgc_level = value; | 633 | rt2x00dev->link.vgc_level = value; |
634 | } | 634 | } |
635 | 635 | ||
636 | /* | ||
637 | * NOTE: This function is directly ported from legacy driver, but | ||
638 | * despite it being declared it was never called. Although link tuning | ||
639 | * sounds like a good idea, and usually works well for the other drivers, | ||
640 | * it does _not_ work with rt2500usb. Enabling this function will result | ||
641 | * in TX capabilities only until association kicks in. Immediately | ||
642 | * after the successful association all TX frames will be kept in the | ||
643 | * hardware queue and never transmitted. | ||
644 | */ | ||
645 | #if 0 | ||
636 | static void rt2500usb_link_tuner(struct rt2x00_dev *rt2x00dev) | 646 | static void rt2500usb_link_tuner(struct rt2x00_dev *rt2x00dev) |
637 | { | 647 | { |
638 | int rssi = rt2x00_get_link_rssi(&rt2x00dev->link); | 648 | int rssi = rt2x00_get_link_rssi(&rt2x00dev->link); |
@@ -752,6 +762,9 @@ dynamic_cca_tune: | |||
752 | rt2x00dev->link.vgc_level = r17; | 762 | rt2x00dev->link.vgc_level = r17; |
753 | } | 763 | } |
754 | } | 764 | } |
765 | #else | ||
766 | #define rt2500usb_link_tuner NULL | ||
767 | #endif | ||
755 | 768 | ||
756 | /* | 769 | /* |
757 | * Initialization functions. | 770 | * Initialization functions. |
@@ -1376,6 +1389,9 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1376 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_VGCLOWER, bbp); | 1389 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_VGCLOWER, bbp); |
1377 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_VGC, word); | 1390 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_VGC, word); |
1378 | EEPROM(rt2x00dev, "BBPtune vgc: 0x%04x\n", word); | 1391 | EEPROM(rt2x00dev, "BBPtune vgc: 0x%04x\n", word); |
1392 | } else { | ||
1393 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_VGCLOWER, bbp); | ||
1394 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_VGC, word); | ||
1379 | } | 1395 | } |
1380 | 1396 | ||
1381 | rt2x00_eeprom_read(rt2x00dev, EEPROM_BBPTUNE_R17, &word); | 1397 | rt2x00_eeprom_read(rt2x00dev, EEPROM_BBPTUNE_R17, &word); |
@@ -1384,9 +1400,6 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1384 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R17_HIGH, 0x41); | 1400 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R17_HIGH, 0x41); |
1385 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_R17, word); | 1401 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_R17, word); |
1386 | EEPROM(rt2x00dev, "BBPtune r17: 0x%04x\n", word); | 1402 | EEPROM(rt2x00dev, "BBPtune r17: 0x%04x\n", word); |
1387 | } else { | ||
1388 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_VGCLOWER, bbp); | ||
1389 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_VGC, word); | ||
1390 | } | 1403 | } |
1391 | 1404 | ||
1392 | rt2x00_eeprom_read(rt2x00dev, EEPROM_BBPTUNE_R24, &word); | 1405 | rt2x00_eeprom_read(rt2x00dev, EEPROM_BBPTUNE_R24, &word); |
@@ -1737,6 +1750,7 @@ static int rt2500usb_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
1737 | __set_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags); | 1750 | __set_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags); |
1738 | __set_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags); | 1751 | __set_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags); |
1739 | __set_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags); | 1752 | __set_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags); |
1753 | __set_bit(CONFIG_DISABLE_LINK_TUNING, &rt2x00dev->flags); | ||
1740 | 1754 | ||
1741 | /* | 1755 | /* |
1742 | * Set the rssi offset. | 1756 | * Set the rssi offset. |