diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-05-05 16:14:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-05 16:14:16 -0400 |
commit | 83163244f845c296a118ce85c653872dbff6abfe (patch) | |
tree | ce2eac695a1c198f23d537e20ed86c16ece21f7e /drivers/net/wireless/rt2x00 | |
parent | 0a12761bcd5646691c5d16dd93df84d1b8849285 (diff) | |
parent | adfba3c7c026a6a5560d2a43fefc9b198cb74462 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
drivers/net/wireless/libertas_tf/cmd.c
drivers/net/wireless/libertas_tf/main.c
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/Kconfig | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800.h | 11 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 91 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 2 |
13 files changed, 106 insertions, 47 deletions
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig index 5239e082cd0f..eea1ef2f502b 100644 --- a/drivers/net/wireless/rt2x00/Kconfig +++ b/drivers/net/wireless/rt2x00/Kconfig | |||
@@ -87,7 +87,7 @@ if RT2800PCI | |||
87 | 87 | ||
88 | config RT2800PCI_RT30XX | 88 | config RT2800PCI_RT30XX |
89 | bool "rt2800pci - Include support for rt30xx (PCI/PCIe/PCMCIA) devices" | 89 | bool "rt2800pci - Include support for rt30xx (PCI/PCIe/PCMCIA) devices" |
90 | default n | 90 | default y |
91 | ---help--- | 91 | ---help--- |
92 | This adds support for rt30xx wireless chipset family to the | 92 | This adds support for rt30xx wireless chipset family to the |
93 | rt2800pci driver. | 93 | rt2800pci driver. |
@@ -156,7 +156,7 @@ if RT2800USB | |||
156 | 156 | ||
157 | config RT2800USB_RT30XX | 157 | config RT2800USB_RT30XX |
158 | bool "rt2800usb - Include support for rt30xx (USB) devices" | 158 | bool "rt2800usb - Include support for rt30xx (USB) devices" |
159 | default n | 159 | default y |
160 | ---help--- | 160 | ---help--- |
161 | This adds support for rt30xx wireless chipset family to the | 161 | This adds support for rt30xx wireless chipset family to the |
162 | rt2800usb driver. | 162 | rt2800usb driver. |
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index cdbf59108ef9..06b92f8b7a55 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1018,8 +1018,8 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1018 | rt2x00_desc_write(entry_priv->desc, 1, word); | 1018 | rt2x00_desc_write(entry_priv->desc, 1, word); |
1019 | 1019 | ||
1020 | rt2x00_desc_read(txd, 2, &word); | 1020 | rt2x00_desc_read(txd, 2, &word); |
1021 | rt2x00_set_field32(&word, TXD_W2_BUFFER_LENGTH, skb->len); | 1021 | rt2x00_set_field32(&word, TXD_W2_BUFFER_LENGTH, txdesc->length); |
1022 | rt2x00_set_field32(&word, TXD_W2_DATABYTE_COUNT, skb->len); | 1022 | rt2x00_set_field32(&word, TXD_W2_DATABYTE_COUNT, txdesc->length); |
1023 | rt2x00_desc_write(txd, 2, word); | 1023 | rt2x00_desc_write(txd, 2, word); |
1024 | 1024 | ||
1025 | rt2x00_desc_read(txd, 3, &word); | 1025 | rt2x00_desc_read(txd, 3, &word); |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 89e986f449da..ae8e205df269 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1209,7 +1209,7 @@ static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1209 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); | 1209 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); |
1210 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, | 1210 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, |
1211 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); | 1211 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); |
1212 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skb->len); | 1212 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length); |
1213 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE); | 1213 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE); |
1214 | rt2x00_desc_write(txd, 0, word); | 1214 | rt2x00_desc_write(txd, 0, word); |
1215 | } | 1215 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 7185cb05f257..41d9996c80e6 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1072,7 +1072,7 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1072 | rt2x00_set_field32(&word, TXD_W0_NEW_SEQ, | 1072 | rt2x00_set_field32(&word, TXD_W0_NEW_SEQ, |
1073 | test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)); | 1073 | test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)); |
1074 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); | 1074 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); |
1075 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skb->len); | 1075 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length); |
1076 | rt2x00_set_field32(&word, TXD_W0_CIPHER, !!txdesc->cipher); | 1076 | rt2x00_set_field32(&word, TXD_W0_CIPHER, !!txdesc->cipher); |
1077 | rt2x00_set_field32(&word, TXD_W0_KEY_ID, txdesc->key_idx); | 1077 | rt2x00_set_field32(&word, TXD_W0_KEY_ID, txdesc->key_idx); |
1078 | rt2x00_desc_write(txd, 0, word); | 1078 | rt2x00_desc_write(txd, 0, word); |
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h index ec893721cc80..2aa03751c341 100644 --- a/drivers/net/wireless/rt2x00/rt2800.h +++ b/drivers/net/wireless/rt2x00/rt2800.h | |||
@@ -107,7 +107,7 @@ | |||
107 | /* | 107 | /* |
108 | * INT_SOURCE_CSR: Interrupt source register. | 108 | * INT_SOURCE_CSR: Interrupt source register. |
109 | * Write one to clear corresponding bit. | 109 | * Write one to clear corresponding bit. |
110 | * TX_FIFO_STATUS: FIFO Statistics is full, sw should read 0x171c | 110 | * TX_FIFO_STATUS: FIFO Statistics is full, sw should read TX_STA_FIFO |
111 | */ | 111 | */ |
112 | #define INT_SOURCE_CSR 0x0200 | 112 | #define INT_SOURCE_CSR 0x0200 |
113 | #define INT_SOURCE_CSR_RXDELAYINT FIELD32(0x00000001) | 113 | #define INT_SOURCE_CSR_RXDELAYINT FIELD32(0x00000001) |
@@ -845,7 +845,7 @@ | |||
845 | * TX_BAND_CFG: 0x1 use upper 20MHz, 0x0 use lower 20MHz | 845 | * TX_BAND_CFG: 0x1 use upper 20MHz, 0x0 use lower 20MHz |
846 | */ | 846 | */ |
847 | #define TX_BAND_CFG 0x132c | 847 | #define TX_BAND_CFG 0x132c |
848 | #define TX_BAND_CFG_HT40_PLUS FIELD32(0x00000001) | 848 | #define TX_BAND_CFG_HT40_MINUS FIELD32(0x00000001) |
849 | #define TX_BAND_CFG_A FIELD32(0x00000002) | 849 | #define TX_BAND_CFG_A FIELD32(0x00000002) |
850 | #define TX_BAND_CFG_BG FIELD32(0x00000004) | 850 | #define TX_BAND_CFG_BG FIELD32(0x00000004) |
851 | 851 | ||
@@ -1519,7 +1519,7 @@ struct mac_iveiv_entry { | |||
1519 | * BBP 3: RX Antenna | 1519 | * BBP 3: RX Antenna |
1520 | */ | 1520 | */ |
1521 | #define BBP3_RX_ANTENNA FIELD8(0x18) | 1521 | #define BBP3_RX_ANTENNA FIELD8(0x18) |
1522 | #define BBP3_HT40_PLUS FIELD8(0x20) | 1522 | #define BBP3_HT40_MINUS FIELD8(0x20) |
1523 | 1523 | ||
1524 | /* | 1524 | /* |
1525 | * BBP 4: Bandwidth | 1525 | * BBP 4: Bandwidth |
@@ -1566,6 +1566,11 @@ struct mac_iveiv_entry { | |||
1566 | #define RFCSR12_TX_POWER FIELD8(0x1f) | 1566 | #define RFCSR12_TX_POWER FIELD8(0x1f) |
1567 | 1567 | ||
1568 | /* | 1568 | /* |
1569 | * RFCSR 13: | ||
1570 | */ | ||
1571 | #define RFCSR13_TX_POWER FIELD8(0x1f) | ||
1572 | |||
1573 | /* | ||
1569 | * RFCSR 15: | 1574 | * RFCSR 15: |
1570 | */ | 1575 | */ |
1571 | #define RFCSR15_TX_LO2_EN FIELD8(0x08) | 1576 | #define RFCSR15_TX_LO2_EN FIELD8(0x08) |
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 2648f315a934..e37bbeab9233 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -41,9 +41,6 @@ | |||
41 | #if defined(CONFIG_RT2X00_LIB_USB) || defined(CONFIG_RT2X00_LIB_USB_MODULE) | 41 | #if defined(CONFIG_RT2X00_LIB_USB) || defined(CONFIG_RT2X00_LIB_USB_MODULE) |
42 | #include "rt2x00usb.h" | 42 | #include "rt2x00usb.h" |
43 | #endif | 43 | #endif |
44 | #if defined(CONFIG_RT2X00_LIB_PCI) || defined(CONFIG_RT2X00_LIB_PCI_MODULE) | ||
45 | #include "rt2x00pci.h" | ||
46 | #endif | ||
47 | #include "rt2800lib.h" | 44 | #include "rt2800lib.h" |
48 | #include "rt2800.h" | 45 | #include "rt2800.h" |
49 | #include "rt2800usb.h" | 46 | #include "rt2800usb.h" |
@@ -76,6 +73,23 @@ MODULE_LICENSE("GPL"); | |||
76 | rt2800_regbusy_read((__dev), H2M_MAILBOX_CSR, \ | 73 | rt2800_regbusy_read((__dev), H2M_MAILBOX_CSR, \ |
77 | H2M_MAILBOX_CSR_OWNER, (__reg)) | 74 | H2M_MAILBOX_CSR_OWNER, (__reg)) |
78 | 75 | ||
76 | static inline bool rt2800_is_305x_soc(struct rt2x00_dev *rt2x00dev) | ||
77 | { | ||
78 | /* check for rt2872 on SoC */ | ||
79 | if (!rt2x00_is_soc(rt2x00dev) || | ||
80 | !rt2x00_rt(rt2x00dev, RT2872)) | ||
81 | return false; | ||
82 | |||
83 | /* we know for sure that these rf chipsets are used on rt305x boards */ | ||
84 | if (rt2x00_rf(rt2x00dev, RF3020) || | ||
85 | rt2x00_rf(rt2x00dev, RF3021) || | ||
86 | rt2x00_rf(rt2x00dev, RF3022)) | ||
87 | return true; | ||
88 | |||
89 | NOTICE(rt2x00dev, "Unknown RF chipset on rt305x\n"); | ||
90 | return false; | ||
91 | } | ||
92 | |||
79 | static void rt2800_bbp_write(struct rt2x00_dev *rt2x00dev, | 93 | static void rt2800_bbp_write(struct rt2x00_dev *rt2x00dev, |
80 | const unsigned int word, const u8 value) | 94 | const unsigned int word, const u8 value) |
81 | { | 95 | { |
@@ -794,6 +808,11 @@ static void rt2800_config_channel_rf3xxx(struct rt2x00_dev *rt2x00dev, | |||
794 | TXPOWER_G_TO_DEV(info->tx_power1)); | 808 | TXPOWER_G_TO_DEV(info->tx_power1)); |
795 | rt2800_rfcsr_write(rt2x00dev, 12, rfcsr); | 809 | rt2800_rfcsr_write(rt2x00dev, 12, rfcsr); |
796 | 810 | ||
811 | rt2800_rfcsr_read(rt2x00dev, 13, &rfcsr); | ||
812 | rt2x00_set_field8(&rfcsr, RFCSR13_TX_POWER, | ||
813 | TXPOWER_G_TO_DEV(info->tx_power2)); | ||
814 | rt2800_rfcsr_write(rt2x00dev, 13, rfcsr); | ||
815 | |||
797 | rt2800_rfcsr_read(rt2x00dev, 23, &rfcsr); | 816 | rt2800_rfcsr_read(rt2x00dev, 23, &rfcsr); |
798 | rt2x00_set_field8(&rfcsr, RFCSR23_FREQ_OFFSET, rt2x00dev->freq_offset); | 817 | rt2x00_set_field8(&rfcsr, RFCSR23_FREQ_OFFSET, rt2x00dev->freq_offset); |
799 | rt2800_rfcsr_write(rt2x00dev, 23, rfcsr); | 818 | rt2800_rfcsr_write(rt2x00dev, 23, rfcsr); |
@@ -849,7 +868,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, | |||
849 | } | 868 | } |
850 | 869 | ||
851 | rt2800_register_read(rt2x00dev, TX_BAND_CFG, ®); | 870 | rt2800_register_read(rt2x00dev, TX_BAND_CFG, ®); |
852 | rt2x00_set_field32(®, TX_BAND_CFG_HT40_PLUS, conf_is_ht40_plus(conf)); | 871 | rt2x00_set_field32(®, TX_BAND_CFG_HT40_MINUS, conf_is_ht40_minus(conf)); |
853 | rt2x00_set_field32(®, TX_BAND_CFG_A, rf->channel > 14); | 872 | rt2x00_set_field32(®, TX_BAND_CFG_A, rf->channel > 14); |
854 | rt2x00_set_field32(®, TX_BAND_CFG_BG, rf->channel <= 14); | 873 | rt2x00_set_field32(®, TX_BAND_CFG_BG, rf->channel <= 14); |
855 | rt2800_register_write(rt2x00dev, TX_BAND_CFG, reg); | 874 | rt2800_register_write(rt2x00dev, TX_BAND_CFG, reg); |
@@ -882,7 +901,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, | |||
882 | rt2800_bbp_write(rt2x00dev, 4, bbp); | 901 | rt2800_bbp_write(rt2x00dev, 4, bbp); |
883 | 902 | ||
884 | rt2800_bbp_read(rt2x00dev, 3, &bbp); | 903 | rt2800_bbp_read(rt2x00dev, 3, &bbp); |
885 | rt2x00_set_field8(&bbp, BBP3_HT40_PLUS, conf_is_ht40_plus(conf)); | 904 | rt2x00_set_field8(&bbp, BBP3_HT40_MINUS, conf_is_ht40_minus(conf)); |
886 | rt2800_bbp_write(rt2x00dev, 3, bbp); | 905 | rt2800_bbp_write(rt2x00dev, 3, bbp); |
887 | 906 | ||
888 | if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) { | 907 | if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) { |
@@ -1551,6 +1570,9 @@ int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev) | |||
1551 | rt2800_wait_bbp_ready(rt2x00dev))) | 1570 | rt2800_wait_bbp_ready(rt2x00dev))) |
1552 | return -EACCES; | 1571 | return -EACCES; |
1553 | 1572 | ||
1573 | if (rt2800_is_305x_soc(rt2x00dev)) | ||
1574 | rt2800_bbp_write(rt2x00dev, 31, 0x08); | ||
1575 | |||
1554 | rt2800_bbp_write(rt2x00dev, 65, 0x2c); | 1576 | rt2800_bbp_write(rt2x00dev, 65, 0x2c); |
1555 | rt2800_bbp_write(rt2x00dev, 66, 0x38); | 1577 | rt2800_bbp_write(rt2x00dev, 66, 0x38); |
1556 | 1578 | ||
@@ -1571,6 +1593,9 @@ int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev) | |||
1571 | rt2800_bbp_write(rt2x00dev, 79, 0x13); | 1593 | rt2800_bbp_write(rt2x00dev, 79, 0x13); |
1572 | rt2800_bbp_write(rt2x00dev, 80, 0x05); | 1594 | rt2800_bbp_write(rt2x00dev, 80, 0x05); |
1573 | rt2800_bbp_write(rt2x00dev, 81, 0x33); | 1595 | rt2800_bbp_write(rt2x00dev, 81, 0x33); |
1596 | } else if (rt2800_is_305x_soc(rt2x00dev)) { | ||
1597 | rt2800_bbp_write(rt2x00dev, 78, 0x0e); | ||
1598 | rt2800_bbp_write(rt2x00dev, 80, 0x08); | ||
1574 | } else { | 1599 | } else { |
1575 | rt2800_bbp_write(rt2x00dev, 81, 0x37); | 1600 | rt2800_bbp_write(rt2x00dev, 81, 0x37); |
1576 | } | 1601 | } |
@@ -1591,12 +1616,16 @@ int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev) | |||
1591 | if (rt2x00_rt_rev_gte(rt2x00dev, RT3070, REV_RT3070F) || | 1616 | if (rt2x00_rt_rev_gte(rt2x00dev, RT3070, REV_RT3070F) || |
1592 | rt2x00_rt_rev_gte(rt2x00dev, RT3071, REV_RT3071E) || | 1617 | rt2x00_rt_rev_gte(rt2x00dev, RT3071, REV_RT3071E) || |
1593 | rt2x00_rt_rev_gte(rt2x00dev, RT3090, REV_RT3090E) || | 1618 | rt2x00_rt_rev_gte(rt2x00dev, RT3090, REV_RT3090E) || |
1594 | rt2x00_rt_rev_gte(rt2x00dev, RT3390, REV_RT3390E)) | 1619 | rt2x00_rt_rev_gte(rt2x00dev, RT3390, REV_RT3390E) || |
1620 | rt2800_is_305x_soc(rt2x00dev)) | ||
1595 | rt2800_bbp_write(rt2x00dev, 103, 0xc0); | 1621 | rt2800_bbp_write(rt2x00dev, 103, 0xc0); |
1596 | else | 1622 | else |
1597 | rt2800_bbp_write(rt2x00dev, 103, 0x00); | 1623 | rt2800_bbp_write(rt2x00dev, 103, 0x00); |
1598 | 1624 | ||
1599 | rt2800_bbp_write(rt2x00dev, 105, 0x05); | 1625 | if (rt2800_is_305x_soc(rt2x00dev)) |
1626 | rt2800_bbp_write(rt2x00dev, 105, 0x01); | ||
1627 | else | ||
1628 | rt2800_bbp_write(rt2x00dev, 105, 0x05); | ||
1600 | rt2800_bbp_write(rt2x00dev, 106, 0x35); | 1629 | rt2800_bbp_write(rt2x00dev, 106, 0x35); |
1601 | 1630 | ||
1602 | if (rt2x00_rt(rt2x00dev, RT3071) || | 1631 | if (rt2x00_rt(rt2x00dev, RT3071) || |
@@ -1613,11 +1642,6 @@ int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev) | |||
1613 | rt2800_bbp_write(rt2x00dev, 138, value); | 1642 | rt2800_bbp_write(rt2x00dev, 138, value); |
1614 | } | 1643 | } |
1615 | 1644 | ||
1616 | if (rt2x00_rt(rt2x00dev, RT2872)) { | ||
1617 | rt2800_bbp_write(rt2x00dev, 31, 0x08); | ||
1618 | rt2800_bbp_write(rt2x00dev, 78, 0x0e); | ||
1619 | rt2800_bbp_write(rt2x00dev, 80, 0x08); | ||
1620 | } | ||
1621 | 1645 | ||
1622 | for (i = 0; i < EEPROM_BBP_SIZE; i++) { | 1646 | for (i = 0; i < EEPROM_BBP_SIZE; i++) { |
1623 | rt2x00_eeprom_read(rt2x00dev, EEPROM_BBP_START + i, &eeprom); | 1647 | rt2x00_eeprom_read(rt2x00dev, EEPROM_BBP_START + i, &eeprom); |
@@ -1703,7 +1727,8 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev) | |||
1703 | if (!rt2x00_rt(rt2x00dev, RT3070) && | 1727 | if (!rt2x00_rt(rt2x00dev, RT3070) && |
1704 | !rt2x00_rt(rt2x00dev, RT3071) && | 1728 | !rt2x00_rt(rt2x00dev, RT3071) && |
1705 | !rt2x00_rt(rt2x00dev, RT3090) && | 1729 | !rt2x00_rt(rt2x00dev, RT3090) && |
1706 | !rt2x00_rt(rt2x00dev, RT3390)) | 1730 | !rt2x00_rt(rt2x00dev, RT3390) && |
1731 | !rt2800_is_305x_soc(rt2x00dev)) | ||
1707 | return 0; | 1732 | return 0; |
1708 | 1733 | ||
1709 | /* | 1734 | /* |
@@ -1771,6 +1796,40 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev) | |||
1771 | rt2800_rfcsr_write(rt2x00dev, 29, 0x8f); | 1796 | rt2800_rfcsr_write(rt2x00dev, 29, 0x8f); |
1772 | rt2800_rfcsr_write(rt2x00dev, 30, 0x20); | 1797 | rt2800_rfcsr_write(rt2x00dev, 30, 0x20); |
1773 | rt2800_rfcsr_write(rt2x00dev, 31, 0x0f); | 1798 | rt2800_rfcsr_write(rt2x00dev, 31, 0x0f); |
1799 | } else if (rt2800_is_305x_soc(rt2x00dev)) { | ||
1800 | rt2800_rfcsr_write(rt2x00dev, 0, 0x50); | ||
1801 | rt2800_rfcsr_write(rt2x00dev, 1, 0x01); | ||
1802 | rt2800_rfcsr_write(rt2x00dev, 2, 0xf7); | ||
1803 | rt2800_rfcsr_write(rt2x00dev, 3, 0x75); | ||
1804 | rt2800_rfcsr_write(rt2x00dev, 4, 0x40); | ||
1805 | rt2800_rfcsr_write(rt2x00dev, 5, 0x03); | ||
1806 | rt2800_rfcsr_write(rt2x00dev, 6, 0x02); | ||
1807 | rt2800_rfcsr_write(rt2x00dev, 7, 0x50); | ||
1808 | rt2800_rfcsr_write(rt2x00dev, 8, 0x39); | ||
1809 | rt2800_rfcsr_write(rt2x00dev, 9, 0x0f); | ||
1810 | rt2800_rfcsr_write(rt2x00dev, 10, 0x60); | ||
1811 | rt2800_rfcsr_write(rt2x00dev, 11, 0x21); | ||
1812 | rt2800_rfcsr_write(rt2x00dev, 12, 0x75); | ||
1813 | rt2800_rfcsr_write(rt2x00dev, 13, 0x75); | ||
1814 | rt2800_rfcsr_write(rt2x00dev, 14, 0x90); | ||
1815 | rt2800_rfcsr_write(rt2x00dev, 15, 0x58); | ||
1816 | rt2800_rfcsr_write(rt2x00dev, 16, 0xb3); | ||
1817 | rt2800_rfcsr_write(rt2x00dev, 17, 0x92); | ||
1818 | rt2800_rfcsr_write(rt2x00dev, 18, 0x2c); | ||
1819 | rt2800_rfcsr_write(rt2x00dev, 19, 0x02); | ||
1820 | rt2800_rfcsr_write(rt2x00dev, 20, 0xba); | ||
1821 | rt2800_rfcsr_write(rt2x00dev, 21, 0xdb); | ||
1822 | rt2800_rfcsr_write(rt2x00dev, 22, 0x00); | ||
1823 | rt2800_rfcsr_write(rt2x00dev, 23, 0x31); | ||
1824 | rt2800_rfcsr_write(rt2x00dev, 24, 0x08); | ||
1825 | rt2800_rfcsr_write(rt2x00dev, 25, 0x01); | ||
1826 | rt2800_rfcsr_write(rt2x00dev, 26, 0x25); | ||
1827 | rt2800_rfcsr_write(rt2x00dev, 27, 0x23); | ||
1828 | rt2800_rfcsr_write(rt2x00dev, 28, 0x13); | ||
1829 | rt2800_rfcsr_write(rt2x00dev, 29, 0x83); | ||
1830 | rt2800_rfcsr_write(rt2x00dev, 30, 0x00); | ||
1831 | rt2800_rfcsr_write(rt2x00dev, 31, 0x00); | ||
1832 | return 0; | ||
1774 | } | 1833 | } |
1775 | 1834 | ||
1776 | if (rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070F)) { | 1835 | if (rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070F)) { |
@@ -1986,7 +2045,6 @@ int rt2800_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1986 | EEPROM(rt2x00dev, "Antenna: 0x%04x\n", word); | 2045 | EEPROM(rt2x00dev, "Antenna: 0x%04x\n", word); |
1987 | } else if (rt2x00_rt(rt2x00dev, RT2860) || | 2046 | } else if (rt2x00_rt(rt2x00dev, RT2860) || |
1988 | rt2x00_rt(rt2x00dev, RT2870) || | 2047 | rt2x00_rt(rt2x00dev, RT2870) || |
1989 | rt2x00_rt(rt2x00dev, RT2872) || | ||
1990 | rt2x00_rt(rt2x00dev, RT2872)) { | 2048 | rt2x00_rt(rt2x00dev, RT2872)) { |
1991 | /* | 2049 | /* |
1992 | * There is a max of 2 RX streams for RT28x0 series | 2050 | * There is a max of 2 RX streams for RT28x0 series |
@@ -2318,8 +2376,11 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
2318 | else | 2376 | else |
2319 | spec->ht.ht_supported = false; | 2377 | spec->ht.ht_supported = false; |
2320 | 2378 | ||
2379 | /* | ||
2380 | * Don't set IEEE80211_HT_CAP_SUP_WIDTH_20_40 for now as it causes | ||
2381 | * reception problems with HT40 capable 11n APs | ||
2382 | */ | ||
2321 | spec->ht.cap = | 2383 | spec->ht.cap = |
2322 | IEEE80211_HT_CAP_SUP_WIDTH_20_40 | | ||
2323 | IEEE80211_HT_CAP_GRN_FLD | | 2384 | IEEE80211_HT_CAP_GRN_FLD | |
2324 | IEEE80211_HT_CAP_SGI_20 | | 2385 | IEEE80211_HT_CAP_SGI_20 | |
2325 | IEEE80211_HT_CAP_SGI_40 | | 2386 | IEEE80211_HT_CAP_SGI_40 | |
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 0e52f174896c..f08b6a37bf2d 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -663,7 +663,7 @@ static int rt2800pci_write_tx_data(struct queue_entry* entry, | |||
663 | test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ? | 663 | test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ? |
664 | txdesc->key_idx : 0xff); | 664 | txdesc->key_idx : 0xff); |
665 | rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT, | 665 | rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT, |
666 | skb->len - txdesc->l2pad); | 666 | txdesc->length); |
667 | rt2x00_set_field32(&word, TXWI_W1_PACKETID, | 667 | rt2x00_set_field32(&word, TXWI_W1_PACKETID, |
668 | skbdesc->entry->queue->qid + 1); | 668 | skbdesc->entry->queue->qid + 1); |
669 | rt2x00_desc_write(txwi, 1, word); | 669 | rt2x00_desc_write(txwi, 1, word); |
@@ -895,10 +895,6 @@ static void rt2800pci_fill_rxdone(struct queue_entry *entry, | |||
895 | (rt2x00_get_field32(rxwi2, RXWI_W2_RSSI0) + | 895 | (rt2x00_get_field32(rxwi2, RXWI_W2_RSSI0) + |
896 | rt2x00_get_field32(rxwi2, RXWI_W2_RSSI1)) / 2; | 896 | rt2x00_get_field32(rxwi2, RXWI_W2_RSSI1)) / 2; |
897 | 897 | ||
898 | rxdesc->noise = | ||
899 | (rt2x00_get_field32(rxwi3, RXWI_W3_SNR0) + | ||
900 | rt2x00_get_field32(rxwi3, RXWI_W3_SNR1)) / 2; | ||
901 | |||
902 | rxdesc->size = rt2x00_get_field32(rxwi0, RXWI_W0_MPDU_TOTAL_BYTE_COUNT); | 898 | rxdesc->size = rt2x00_get_field32(rxwi0, RXWI_W0_MPDU_TOTAL_BYTE_COUNT); |
903 | 899 | ||
904 | /* | 900 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 95c8a6134ff8..e3f3a97db807 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -437,7 +437,7 @@ static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
437 | test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ? | 437 | test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ? |
438 | txdesc->key_idx : 0xff); | 438 | txdesc->key_idx : 0xff); |
439 | rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT, | 439 | rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT, |
440 | skb->len - txdesc->l2pad); | 440 | txdesc->length); |
441 | rt2x00_set_field32(&word, TXWI_W1_PACKETID, | 441 | rt2x00_set_field32(&word, TXWI_W1_PACKETID, |
442 | skbdesc->entry->queue->qid + 1); | 442 | skbdesc->entry->queue->qid + 1); |
443 | rt2x00_desc_write(txwi, 1, word); | 443 | rt2x00_desc_write(txwi, 1, word); |
@@ -645,10 +645,6 @@ static void rt2800usb_fill_rxdone(struct queue_entry *entry, | |||
645 | (rt2x00_get_field32(rxwi2, RXWI_W2_RSSI0) + | 645 | (rt2x00_get_field32(rxwi2, RXWI_W2_RSSI0) + |
646 | rt2x00_get_field32(rxwi2, RXWI_W2_RSSI1)) / 2; | 646 | rt2x00_get_field32(rxwi2, RXWI_W2_RSSI1)) / 2; |
647 | 647 | ||
648 | rxdesc->noise = | ||
649 | (rt2x00_get_field32(rxwi3, RXWI_W3_SNR0) + | ||
650 | rt2x00_get_field32(rxwi3, RXWI_W3_SNR1)) / 2; | ||
651 | |||
652 | rxdesc->size = rt2x00_get_field32(rxwi0, RXWI_W0_MPDU_TOTAL_BYTE_COUNT); | 648 | rxdesc->size = rt2x00_get_field32(rxwi0, RXWI_W0_MPDU_TOTAL_BYTE_COUNT); |
653 | 649 | ||
654 | /* | 650 | /* |
@@ -1027,7 +1023,7 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1027 | #ifdef CONFIG_RT2800USB_UNKNOWN | 1023 | #ifdef CONFIG_RT2800USB_UNKNOWN |
1028 | /* | 1024 | /* |
1029 | * Unclear what kind of devices these are (they aren't supported by the | 1025 | * Unclear what kind of devices these are (they aren't supported by the |
1030 | * vendor driver). | 1026 | * vendor linux driver). |
1031 | */ | 1027 | */ |
1032 | /* Amigo */ | 1028 | /* Amigo */ |
1033 | { USB_DEVICE(0x0e0b, 0x9031), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1029 | { USB_DEVICE(0x0e0b, 0x9031), USB_DEVICE_DATA(&rt2800usb_ops) }, |
@@ -1040,6 +1036,7 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1040 | /* AzureWave */ | 1036 | /* AzureWave */ |
1041 | { USB_DEVICE(0x13d3, 0x3262), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1037 | { USB_DEVICE(0x13d3, 0x3262), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1042 | { USB_DEVICE(0x13d3, 0x3284), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1038 | { USB_DEVICE(0x13d3, 0x3284), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1039 | { USB_DEVICE(0x13d3, 0x3322), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1043 | /* Belkin */ | 1040 | /* Belkin */ |
1044 | { USB_DEVICE(0x050d, 0x825a), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1041 | { USB_DEVICE(0x050d, 0x825a), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1045 | /* Buffalo */ | 1042 | /* Buffalo */ |
@@ -1058,6 +1055,7 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1058 | { USB_DEVICE(0x07d1, 0x3c0b), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1055 | { USB_DEVICE(0x07d1, 0x3c0b), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1059 | { USB_DEVICE(0x07d1, 0x3c13), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1056 | { USB_DEVICE(0x07d1, 0x3c13), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1060 | { USB_DEVICE(0x07d1, 0x3c15), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1057 | { USB_DEVICE(0x07d1, 0x3c15), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1058 | { USB_DEVICE(0x07d1, 0x3c17), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1061 | /* Encore */ | 1059 | /* Encore */ |
1062 | { USB_DEVICE(0x203d, 0x14a1), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1060 | { USB_DEVICE(0x203d, 0x14a1), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1063 | /* Gemtek */ | 1061 | /* Gemtek */ |
@@ -1074,11 +1072,13 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1074 | /* Motorola */ | 1072 | /* Motorola */ |
1075 | { USB_DEVICE(0x100d, 0x9032), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1073 | { USB_DEVICE(0x100d, 0x9032), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1076 | /* Ovislink */ | 1074 | /* Ovislink */ |
1075 | { USB_DEVICE(0x1b75, 0x3071), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1077 | { USB_DEVICE(0x1b75, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1076 | { USB_DEVICE(0x1b75, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1078 | /* Pegatron */ | 1077 | /* Pegatron */ |
1079 | { USB_DEVICE(0x05a6, 0x0101), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1078 | { USB_DEVICE(0x05a6, 0x0101), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1080 | { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1079 | { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1081 | { USB_DEVICE(0x1d4d, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1080 | { USB_DEVICE(0x1d4d, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1081 | { USB_DEVICE(0x1d4d, 0x0011), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1082 | /* Planex */ | 1082 | /* Planex */ |
1083 | { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1083 | { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1084 | /* Qcom */ | 1084 | /* Qcom */ |
@@ -1087,6 +1087,7 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1087 | { USB_DEVICE(0x083a, 0xa512), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1087 | { USB_DEVICE(0x083a, 0xa512), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1088 | { USB_DEVICE(0x083a, 0xc522), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1088 | { USB_DEVICE(0x083a, 0xc522), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1089 | { USB_DEVICE(0x083a, 0xd522), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1089 | { USB_DEVICE(0x083a, 0xd522), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1090 | { USB_DEVICE(0x083a, 0xf511), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1090 | /* Sweex */ | 1091 | /* Sweex */ |
1091 | { USB_DEVICE(0x177f, 0x0153), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1092 | { USB_DEVICE(0x177f, 0x0153), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1092 | { USB_DEVICE(0x177f, 0x0313), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1093 | { USB_DEVICE(0x177f, 0x0313), USB_DEVICE_DATA(&rt2800usb_ops) }, |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index eda73ba735a6..3ae468c4d760 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -435,7 +435,6 @@ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev, | |||
435 | rx_status->mactime = rxdesc.timestamp; | 435 | rx_status->mactime = rxdesc.timestamp; |
436 | rx_status->rate_idx = rate_idx; | 436 | rx_status->rate_idx = rate_idx; |
437 | rx_status->signal = rxdesc.rssi; | 437 | rx_status->signal = rxdesc.rssi; |
438 | rx_status->noise = rxdesc.noise; | ||
439 | rx_status->flag = rxdesc.flags; | 438 | rx_status->flag = rxdesc.flags; |
440 | rx_status->antenna = rt2x00dev->link.ant.active.rx; | 439 | rx_status->antenna = rt2x00dev->link.ant.active.rx; |
441 | 440 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 91b7fb99ceb4..e22029fcf411 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -334,12 +334,10 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, | |||
334 | txdesc->aifs = entry->queue->aifs; | 334 | txdesc->aifs = entry->queue->aifs; |
335 | 335 | ||
336 | /* | 336 | /* |
337 | * Header and alignment information. | 337 | * Header and frame information. |
338 | */ | 338 | */ |
339 | txdesc->length = entry->skb->len; | ||
339 | txdesc->header_length = ieee80211_get_hdrlen_from_skb(entry->skb); | 340 | txdesc->header_length = ieee80211_get_hdrlen_from_skb(entry->skb); |
340 | if (test_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags) && | ||
341 | (entry->skb->len > txdesc->header_length)) | ||
342 | txdesc->l2pad = L2PAD_SIZE(txdesc->header_length); | ||
343 | 341 | ||
344 | /* | 342 | /* |
345 | * Check whether this frame is to be acked. | 343 | * Check whether this frame is to be acked. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index c1e482bb37b3..94a48c174d67 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
@@ -183,7 +183,6 @@ enum rxdone_entry_desc_flags { | |||
183 | * @timestamp: RX Timestamp | 183 | * @timestamp: RX Timestamp |
184 | * @signal: Signal of the received frame. | 184 | * @signal: Signal of the received frame. |
185 | * @rssi: RSSI of the received frame. | 185 | * @rssi: RSSI of the received frame. |
186 | * @noise: Measured noise during frame reception. | ||
187 | * @size: Data size of the received frame. | 186 | * @size: Data size of the received frame. |
188 | * @flags: MAC80211 receive flags (See &enum mac80211_rx_flags). | 187 | * @flags: MAC80211 receive flags (See &enum mac80211_rx_flags). |
189 | * @dev_flags: Ralink receive flags (See &enum rxdone_entry_desc_flags). | 188 | * @dev_flags: Ralink receive flags (See &enum rxdone_entry_desc_flags). |
@@ -197,7 +196,6 @@ struct rxdone_entry_desc { | |||
197 | u64 timestamp; | 196 | u64 timestamp; |
198 | int signal; | 197 | int signal; |
199 | int rssi; | 198 | int rssi; |
200 | int noise; | ||
201 | int size; | 199 | int size; |
202 | int flags; | 200 | int flags; |
203 | int dev_flags; | 201 | int dev_flags; |
@@ -287,8 +285,8 @@ enum txentry_desc_flags { | |||
287 | * | 285 | * |
288 | * @flags: Descriptor flags (See &enum queue_entry_flags). | 286 | * @flags: Descriptor flags (See &enum queue_entry_flags). |
289 | * @queue: Queue identification (See &enum data_queue_qid). | 287 | * @queue: Queue identification (See &enum data_queue_qid). |
288 | * @length: Length of the entire frame. | ||
290 | * @header_length: Length of 802.11 header. | 289 | * @header_length: Length of 802.11 header. |
291 | * @l2pad: Amount of padding to align 802.11 payload to 4-byte boundrary. | ||
292 | * @length_high: PLCP length high word. | 290 | * @length_high: PLCP length high word. |
293 | * @length_low: PLCP length low word. | 291 | * @length_low: PLCP length low word. |
294 | * @signal: PLCP signal. | 292 | * @signal: PLCP signal. |
@@ -313,8 +311,8 @@ struct txentry_desc { | |||
313 | 311 | ||
314 | enum data_queue_qid queue; | 312 | enum data_queue_qid queue; |
315 | 313 | ||
314 | u16 length; | ||
316 | u16 header_length; | 315 | u16 header_length; |
317 | u16 l2pad; | ||
318 | 316 | ||
319 | u16 length_high; | 317 | u16 length_high; |
320 | u16 length_low; | 318 | u16 length_low; |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index b9885981f3a8..26ee7911fba9 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -1809,7 +1809,8 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1809 | 1809 | ||
1810 | if (skbdesc->desc_len > TXINFO_SIZE) { | 1810 | if (skbdesc->desc_len > TXINFO_SIZE) { |
1811 | rt2x00_desc_read(txd, 11, &word); | 1811 | rt2x00_desc_read(txd, 11, &word); |
1812 | rt2x00_set_field32(&word, TXD_W11_BUFFER_LENGTH0, skb->len); | 1812 | rt2x00_set_field32(&word, TXD_W11_BUFFER_LENGTH0, |
1813 | txdesc->length); | ||
1813 | rt2x00_desc_write(txd, 11, word); | 1814 | rt2x00_desc_write(txd, 11, word); |
1814 | } | 1815 | } |
1815 | 1816 | ||
@@ -1832,7 +1833,7 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1832 | rt2x00_set_field32(&word, TXD_W0_KEY_TABLE, | 1833 | rt2x00_set_field32(&word, TXD_W0_KEY_TABLE, |
1833 | test_bit(ENTRY_TXD_ENCRYPT_PAIRWISE, &txdesc->flags)); | 1834 | test_bit(ENTRY_TXD_ENCRYPT_PAIRWISE, &txdesc->flags)); |
1834 | rt2x00_set_field32(&word, TXD_W0_KEY_INDEX, txdesc->key_idx); | 1835 | rt2x00_set_field32(&word, TXD_W0_KEY_INDEX, txdesc->key_idx); |
1835 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skb->len); | 1836 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length); |
1836 | rt2x00_set_field32(&word, TXD_W0_BURST, | 1837 | rt2x00_set_field32(&word, TXD_W0_BURST, |
1837 | test_bit(ENTRY_TXD_BURST, &txdesc->flags)); | 1838 | test_bit(ENTRY_TXD_BURST, &txdesc->flags)); |
1838 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, txdesc->cipher); | 1839 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, txdesc->cipher); |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 576ea9dd2824..39b3c6d04af4 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1495,7 +1495,7 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1495 | rt2x00_set_field32(&word, TXD_W0_KEY_TABLE, | 1495 | rt2x00_set_field32(&word, TXD_W0_KEY_TABLE, |
1496 | test_bit(ENTRY_TXD_ENCRYPT_PAIRWISE, &txdesc->flags)); | 1496 | test_bit(ENTRY_TXD_ENCRYPT_PAIRWISE, &txdesc->flags)); |
1497 | rt2x00_set_field32(&word, TXD_W0_KEY_INDEX, txdesc->key_idx); | 1497 | rt2x00_set_field32(&word, TXD_W0_KEY_INDEX, txdesc->key_idx); |
1498 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skb->len); | 1498 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length); |
1499 | rt2x00_set_field32(&word, TXD_W0_BURST2, | 1499 | rt2x00_set_field32(&word, TXD_W0_BURST2, |
1500 | test_bit(ENTRY_TXD_BURST, &txdesc->flags)); | 1500 | test_bit(ENTRY_TXD_BURST, &txdesc->flags)); |
1501 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, txdesc->cipher); | 1501 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, txdesc->cipher); |