rt2x00: Don't check whether hardware crypto is enabled when reading RXD.
authorGertjan van Wingerde <gwingerde@gmail.com>
Sat, 8 May 2010 21:40:20 +0000 (23:40 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 10 May 2010 18:56:47 +0000 (14:56 -0400)
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>
drivers/net/wireless/rt2x00/rt2500usb.c
drivers/net/wireless/rt2x00/rt2800pci.c
drivers/net/wireless/rt2x00/rt2800usb.c
drivers/net/wireless/rt2x00/rt61pci.c
drivers/net/wireless/rt2x00/rt73usb.c

index c6e6e7b0ea53351d47df635a5407c54af70aeea7..f90b308899aaa120a960d35aba0cd9a605e49ba9 100644 (file)
@@ -1213,11 +1213,9 @@ static void rt2500usb_fill_rxdone(struct queue_entry *entry,
        if (rt2x00_get_field32(word0, RXD_W0_PHYSICAL_ERROR))
                rxdesc->flags |= RX_FLAG_FAILED_PLCP_CRC;
 
-       if (test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags)) {
-               rxdesc->cipher = rt2x00_get_field32(word0, RXD_W0_CIPHER);
-               if (rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR))
-                       rxdesc->cipher_status = RX_CRYPTO_FAIL_KEY;
-       }
+       rxdesc->cipher = rt2x00_get_field32(word0, RXD_W0_CIPHER);
+       if (rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR))
+               rxdesc->cipher_status = RX_CRYPTO_FAIL_KEY;
 
        if (rxdesc->cipher != CIPHER_NONE) {
                _rt2x00_desc_read(rxd, 2, &rxdesc->iv[0]);
index df2c3fb8b4b69f7185762b5b4aa594f37e581364..b9ec08180aad5ac17e33c643f685d88f33f37f10 100644 (file)
@@ -840,16 +840,13 @@ static void rt2800pci_fill_rxdone(struct queue_entry *entry,
        if (rt2x00_get_field32(rxd3, RXD_W3_CRC_ERROR))
                rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC;
 
-       if (test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags)) {
-               /*
-                * Unfortunately we don't know the cipher type used during
-                * decryption. This prevents us from correct providing
-                * correct statistics through debugfs.
-                */
-               rxdesc->cipher = rt2x00_get_field32(rxwi0, RXWI_W0_UDF);
-               rxdesc->cipher_status =
-                   rt2x00_get_field32(rxd3, RXD_W3_CIPHER_ERROR);
-       }
+       /*
+        * Unfortunately we don't know the cipher type used during
+        * decryption. This prevents us from correct providing
+        * correct statistics through debugfs.
+        */
+       rxdesc->cipher = rt2x00_get_field32(rxwi0, RXWI_W0_UDF);
+       rxdesc->cipher_status = rt2x00_get_field32(rxd3, RXD_W3_CIPHER_ERROR);
 
        if (rt2x00_get_field32(rxd3, RXD_W3_DECRYPTED)) {
                /*
index 94b68127811edbf1c1089010f9d13b41cfe6739f..df7ad981b808d453a5f7828b7479c348502b0038 100644 (file)
@@ -549,7 +549,6 @@ static void rt2800usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
 static void rt2800usb_fill_rxdone(struct queue_entry *entry,
                                  struct rxdone_entry_desc *rxdesc)
 {
-       struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
        struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb);
        __le32 *rxi = (__le32 *)entry->skb->data;
        __le32 *rxwi;
@@ -595,11 +594,8 @@ static void rt2800usb_fill_rxdone(struct queue_entry *entry,
        if (rt2x00_get_field32(rxd0, RXD_W0_CRC_ERROR))
                rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC;
 
-       if (test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags)) {
-               rxdesc->cipher = rt2x00_get_field32(rxwi0, RXWI_W0_UDF);
-               rxdesc->cipher_status =
-                   rt2x00_get_field32(rxd0, RXD_W0_CIPHER_ERROR);
-       }
+       rxdesc->cipher = rt2x00_get_field32(rxwi0, RXWI_W0_UDF);
+       rxdesc->cipher_status = rt2x00_get_field32(rxd0, RXD_W0_CIPHER_ERROR);
 
        if (rt2x00_get_field32(rxd0, RXD_W0_DECRYPTED)) {
                /*
index 8099ecaf8694468eab67dcd497c202b99faa92d8..1b0c70d65699f7a946bf60e9389797f23c42d2f6 100644 (file)
@@ -1968,12 +1968,8 @@ static void rt61pci_fill_rxdone(struct queue_entry *entry,
        if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR))
                rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC;
 
-       if (test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags)) {
-               rxdesc->cipher =
-                   rt2x00_get_field32(word0, RXD_W0_CIPHER_ALG);
-               rxdesc->cipher_status =
-                   rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR);
-       }
+       rxdesc->cipher = rt2x00_get_field32(word0, RXD_W0_CIPHER_ALG);
+       rxdesc->cipher_status = rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR);
 
        if (rxdesc->cipher != CIPHER_NONE) {
                _rt2x00_desc_read(entry_priv->desc, 2, &rxdesc->iv[0]);
index 1399c18bc667560f3a72e3496d410f84b70709f4..6acba620971f409fdb4323af64b2518a483276cc 100644 (file)
@@ -1644,12 +1644,8 @@ static void rt73usb_fill_rxdone(struct queue_entry *entry,
        if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR))
                rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC;
 
-       if (test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags)) {
-               rxdesc->cipher =
-                   rt2x00_get_field32(word0, RXD_W0_CIPHER_ALG);
-               rxdesc->cipher_status =
-                   rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR);
-       }
+       rxdesc->cipher = rt2x00_get_field32(word0, RXD_W0_CIPHER_ALG);
+       rxdesc->cipher_status = rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR);
 
        if (rxdesc->cipher != CIPHER_NONE) {
                _rt2x00_desc_read(rxd, 2, &rxdesc->iv[0]);