diff options
author | Gertjan van Wingerde <gwingerde@gmail.com> | 2010-05-08 17:40:20 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-10 14:56:47 -0400 |
commit | 78b8f3b0ddb061af1e3907f9c4bca76eae39f79f (patch) | |
tree | 8147984c7ebc56696420fa0055442bcfe1314b5a /drivers/net | |
parent | e6a8aab1648226d64772a8224df0677f555a5632 (diff) |
rt2x00: Don't check whether hardware crypto is enabled when reading RXD.
We should simply follow what the hardware told us it has done.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 8 |
5 files changed, 16 insertions, 33 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index c6e6e7b0ea53..f90b308899aa 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1213,11 +1213,9 @@ static void rt2500usb_fill_rxdone(struct queue_entry *entry, | |||
1213 | if (rt2x00_get_field32(word0, RXD_W0_PHYSICAL_ERROR)) | 1213 | if (rt2x00_get_field32(word0, RXD_W0_PHYSICAL_ERROR)) |
1214 | rxdesc->flags |= RX_FLAG_FAILED_PLCP_CRC; | 1214 | rxdesc->flags |= RX_FLAG_FAILED_PLCP_CRC; |
1215 | 1215 | ||
1216 | if (test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags)) { | 1216 | rxdesc->cipher = rt2x00_get_field32(word0, RXD_W0_CIPHER); |
1217 | rxdesc->cipher = rt2x00_get_field32(word0, RXD_W0_CIPHER); | 1217 | if (rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR)) |
1218 | if (rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR)) | 1218 | rxdesc->cipher_status = RX_CRYPTO_FAIL_KEY; |
1219 | rxdesc->cipher_status = RX_CRYPTO_FAIL_KEY; | ||
1220 | } | ||
1221 | 1219 | ||
1222 | if (rxdesc->cipher != CIPHER_NONE) { | 1220 | if (rxdesc->cipher != CIPHER_NONE) { |
1223 | _rt2x00_desc_read(rxd, 2, &rxdesc->iv[0]); | 1221 | _rt2x00_desc_read(rxd, 2, &rxdesc->iv[0]); |
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index df2c3fb8b4b6..b9ec08180aad 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -840,16 +840,13 @@ static void rt2800pci_fill_rxdone(struct queue_entry *entry, | |||
840 | if (rt2x00_get_field32(rxd3, RXD_W3_CRC_ERROR)) | 840 | if (rt2x00_get_field32(rxd3, RXD_W3_CRC_ERROR)) |
841 | rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; | 841 | rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; |
842 | 842 | ||
843 | if (test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags)) { | 843 | /* |
844 | /* | 844 | * Unfortunately we don't know the cipher type used during |
845 | * Unfortunately we don't know the cipher type used during | 845 | * decryption. This prevents us from correct providing |
846 | * decryption. This prevents us from correct providing | 846 | * correct statistics through debugfs. |
847 | * correct statistics through debugfs. | 847 | */ |
848 | */ | 848 | rxdesc->cipher = rt2x00_get_field32(rxwi0, RXWI_W0_UDF); |
849 | rxdesc->cipher = rt2x00_get_field32(rxwi0, RXWI_W0_UDF); | 849 | rxdesc->cipher_status = rt2x00_get_field32(rxd3, RXD_W3_CIPHER_ERROR); |
850 | rxdesc->cipher_status = | ||
851 | rt2x00_get_field32(rxd3, RXD_W3_CIPHER_ERROR); | ||
852 | } | ||
853 | 850 | ||
854 | if (rt2x00_get_field32(rxd3, RXD_W3_DECRYPTED)) { | 851 | if (rt2x00_get_field32(rxd3, RXD_W3_DECRYPTED)) { |
855 | /* | 852 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 94b68127811e..df7ad981b808 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -549,7 +549,6 @@ static void rt2800usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev, | |||
549 | static void rt2800usb_fill_rxdone(struct queue_entry *entry, | 549 | static void rt2800usb_fill_rxdone(struct queue_entry *entry, |
550 | struct rxdone_entry_desc *rxdesc) | 550 | struct rxdone_entry_desc *rxdesc) |
551 | { | 551 | { |
552 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | ||
553 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); | 552 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); |
554 | __le32 *rxi = (__le32 *)entry->skb->data; | 553 | __le32 *rxi = (__le32 *)entry->skb->data; |
555 | __le32 *rxwi; | 554 | __le32 *rxwi; |
@@ -595,11 +594,8 @@ static void rt2800usb_fill_rxdone(struct queue_entry *entry, | |||
595 | if (rt2x00_get_field32(rxd0, RXD_W0_CRC_ERROR)) | 594 | if (rt2x00_get_field32(rxd0, RXD_W0_CRC_ERROR)) |
596 | rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; | 595 | rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; |
597 | 596 | ||
598 | if (test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags)) { | 597 | rxdesc->cipher = rt2x00_get_field32(rxwi0, RXWI_W0_UDF); |
599 | rxdesc->cipher = rt2x00_get_field32(rxwi0, RXWI_W0_UDF); | 598 | rxdesc->cipher_status = rt2x00_get_field32(rxd0, RXD_W0_CIPHER_ERROR); |
600 | rxdesc->cipher_status = | ||
601 | rt2x00_get_field32(rxd0, RXD_W0_CIPHER_ERROR); | ||
602 | } | ||
603 | 599 | ||
604 | if (rt2x00_get_field32(rxd0, RXD_W0_DECRYPTED)) { | 600 | if (rt2x00_get_field32(rxd0, RXD_W0_DECRYPTED)) { |
605 | /* | 601 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 8099ecaf8694..1b0c70d65699 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -1968,12 +1968,8 @@ static void rt61pci_fill_rxdone(struct queue_entry *entry, | |||
1968 | if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR)) | 1968 | if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR)) |
1969 | rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; | 1969 | rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; |
1970 | 1970 | ||
1971 | if (test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags)) { | 1971 | rxdesc->cipher = rt2x00_get_field32(word0, RXD_W0_CIPHER_ALG); |
1972 | rxdesc->cipher = | 1972 | rxdesc->cipher_status = rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR); |
1973 | rt2x00_get_field32(word0, RXD_W0_CIPHER_ALG); | ||
1974 | rxdesc->cipher_status = | ||
1975 | rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR); | ||
1976 | } | ||
1977 | 1973 | ||
1978 | if (rxdesc->cipher != CIPHER_NONE) { | 1974 | if (rxdesc->cipher != CIPHER_NONE) { |
1979 | _rt2x00_desc_read(entry_priv->desc, 2, &rxdesc->iv[0]); | 1975 | _rt2x00_desc_read(entry_priv->desc, 2, &rxdesc->iv[0]); |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 1399c18bc667..6acba620971f 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1644,12 +1644,8 @@ static void rt73usb_fill_rxdone(struct queue_entry *entry, | |||
1644 | if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR)) | 1644 | if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR)) |
1645 | rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; | 1645 | rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; |
1646 | 1646 | ||
1647 | if (test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags)) { | 1647 | rxdesc->cipher = rt2x00_get_field32(word0, RXD_W0_CIPHER_ALG); |
1648 | rxdesc->cipher = | 1648 | rxdesc->cipher_status = rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR); |
1649 | rt2x00_get_field32(word0, RXD_W0_CIPHER_ALG); | ||
1650 | rxdesc->cipher_status = | ||
1651 | rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR); | ||
1652 | } | ||
1653 | 1649 | ||
1654 | if (rxdesc->cipher != CIPHER_NONE) { | 1650 | if (rxdesc->cipher != CIPHER_NONE) { |
1655 | _rt2x00_desc_read(rxd, 2, &rxdesc->iv[0]); | 1651 | _rt2x00_desc_read(rxd, 2, &rxdesc->iv[0]); |