diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt61pci.c')
| -rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 26ee7911fba9..86c75b9c3f25 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
| @@ -1843,7 +1843,8 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
| 1843 | /* | 1843 | /* |
| 1844 | * TX data initialization | 1844 | * TX data initialization |
| 1845 | */ | 1845 | */ |
| 1846 | static void rt61pci_write_beacon(struct queue_entry *entry) | 1846 | static void rt61pci_write_beacon(struct queue_entry *entry, |
| 1847 | struct txentry_desc *txdesc) | ||
| 1847 | { | 1848 | { |
| 1848 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 1849 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
| 1849 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); | 1850 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); |
| @@ -1870,6 +1871,19 @@ static void rt61pci_write_beacon(struct queue_entry *entry) | |||
| 1870 | entry->skb->data, entry->skb->len); | 1871 | entry->skb->data, entry->skb->len); |
| 1871 | 1872 | ||
| 1872 | /* | 1873 | /* |
| 1874 | * Enable beaconing again. | ||
| 1875 | * | ||
| 1876 | * For Wi-Fi faily generated beacons between participating | ||
| 1877 | * stations. Set TBTT phase adaptive adjustment step to 8us. | ||
| 1878 | */ | ||
| 1879 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR10, 0x00001008); | ||
| 1880 | |||
| 1881 | rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 1); | ||
| 1882 | rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 1); | ||
| 1883 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 1); | ||
| 1884 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); | ||
| 1885 | |||
| 1886 | /* | ||
| 1873 | * Clean up beacon skb. | 1887 | * Clean up beacon skb. |
| 1874 | */ | 1888 | */ |
| 1875 | dev_kfree_skb_any(entry->skb); | 1889 | dev_kfree_skb_any(entry->skb); |
| @@ -1881,23 +1895,6 @@ static void rt61pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, | |||
| 1881 | { | 1895 | { |
| 1882 | u32 reg; | 1896 | u32 reg; |
| 1883 | 1897 | ||
| 1884 | if (queue == QID_BEACON) { | ||
| 1885 | /* | ||
| 1886 | * For Wi-Fi faily generated beacons between participating | ||
| 1887 | * stations. Set TBTT phase adaptive adjustment step to 8us. | ||
| 1888 | */ | ||
| 1889 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR10, 0x00001008); | ||
| 1890 | |||
| 1891 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, ®); | ||
| 1892 | if (!rt2x00_get_field32(reg, TXRX_CSR9_BEACON_GEN)) { | ||
| 1893 | rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 1); | ||
| 1894 | rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 1); | ||
| 1895 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 1); | ||
| 1896 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); | ||
| 1897 | } | ||
| 1898 | return; | ||
| 1899 | } | ||
| 1900 | |||
| 1901 | rt2x00pci_register_read(rt2x00dev, TX_CNTL_CSR, ®); | 1898 | rt2x00pci_register_read(rt2x00dev, TX_CNTL_CSR, ®); |
| 1902 | rt2x00_set_field32(®, TX_CNTL_CSR_KICK_TX_AC0, (queue == QID_AC_BE)); | 1899 | rt2x00_set_field32(®, TX_CNTL_CSR_KICK_TX_AC0, (queue == QID_AC_BE)); |
| 1903 | rt2x00_set_field32(®, TX_CNTL_CSR_KICK_TX_AC1, (queue == QID_AC_BK)); | 1900 | rt2x00_set_field32(®, TX_CNTL_CSR_KICK_TX_AC1, (queue == QID_AC_BK)); |
| @@ -1969,12 +1966,8 @@ static void rt61pci_fill_rxdone(struct queue_entry *entry, | |||
| 1969 | if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR)) | 1966 | if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR)) |
| 1970 | rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; | 1967 | rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; |
| 1971 | 1968 | ||
| 1972 | if (test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags)) { | 1969 | rxdesc->cipher = rt2x00_get_field32(word0, RXD_W0_CIPHER_ALG); |
| 1973 | rxdesc->cipher = | 1970 | rxdesc->cipher_status = rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR); |
| 1974 | rt2x00_get_field32(word0, RXD_W0_CIPHER_ALG); | ||
| 1975 | rxdesc->cipher_status = | ||
| 1976 | rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR); | ||
| 1977 | } | ||
| 1978 | 1971 | ||
| 1979 | if (rxdesc->cipher != CIPHER_NONE) { | 1972 | if (rxdesc->cipher != CIPHER_NONE) { |
| 1980 | _rt2x00_desc_read(entry_priv->desc, 2, &rxdesc->iv[0]); | 1973 | _rt2x00_desc_read(entry_priv->desc, 2, &rxdesc->iv[0]); |
