Commit 78b8f3b0 authored by Gertjan van Wingerde's avatar Gertjan van Wingerde Committed by John W. Linville

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: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e6a8aab1
...@@ -1213,11 +1213,9 @@ static void rt2500usb_fill_rxdone(struct queue_entry *entry, ...@@ -1213,11 +1213,9 @@ static void rt2500usb_fill_rxdone(struct queue_entry *entry,
if (rt2x00_get_field32(word0, RXD_W0_PHYSICAL_ERROR)) if (rt2x00_get_field32(word0, RXD_W0_PHYSICAL_ERROR))
rxdesc->flags |= RX_FLAG_FAILED_PLCP_CRC; 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);
rxdesc->cipher = rt2x00_get_field32(word0, RXD_W0_CIPHER); if (rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR))
if (rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR)) rxdesc->cipher_status = RX_CRYPTO_FAIL_KEY;
rxdesc->cipher_status = RX_CRYPTO_FAIL_KEY;
}
if (rxdesc->cipher != CIPHER_NONE) { if (rxdesc->cipher != CIPHER_NONE) {
_rt2x00_desc_read(rxd, 2, &rxdesc->iv[0]); _rt2x00_desc_read(rxd, 2, &rxdesc->iv[0]);
......
...@@ -840,16 +840,13 @@ static void rt2800pci_fill_rxdone(struct queue_entry *entry, ...@@ -840,16 +840,13 @@ static void rt2800pci_fill_rxdone(struct queue_entry *entry,
if (rt2x00_get_field32(rxd3, RXD_W3_CRC_ERROR)) if (rt2x00_get_field32(rxd3, RXD_W3_CRC_ERROR))
rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; 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
* Unfortunately we don't know the cipher type used during * decryption. This prevents us from correct providing
* decryption. This prevents us from correct providing * correct statistics through debugfs.
* correct statistics through debugfs. */
*/ rxdesc->cipher = rt2x00_get_field32(rxwi0, RXWI_W0_UDF);
rxdesc->cipher = rt2x00_get_field32(rxwi0, RXWI_W0_UDF); rxdesc->cipher_status = rt2x00_get_field32(rxd3, RXD_W3_CIPHER_ERROR);
rxdesc->cipher_status =
rt2x00_get_field32(rxd3, RXD_W3_CIPHER_ERROR);
}
if (rt2x00_get_field32(rxd3, RXD_W3_DECRYPTED)) { if (rt2x00_get_field32(rxd3, RXD_W3_DECRYPTED)) {
/* /*
......
...@@ -549,7 +549,6 @@ static void rt2800usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev, ...@@ -549,7 +549,6 @@ static void rt2800usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
static void rt2800usb_fill_rxdone(struct queue_entry *entry, static void rt2800usb_fill_rxdone(struct queue_entry *entry,
struct rxdone_entry_desc *rxdesc) struct rxdone_entry_desc *rxdesc)
{ {
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb);
__le32 *rxi = (__le32 *)entry->skb->data; __le32 *rxi = (__le32 *)entry->skb->data;
__le32 *rxwi; __le32 *rxwi;
...@@ -595,11 +594,8 @@ static void rt2800usb_fill_rxdone(struct queue_entry *entry, ...@@ -595,11 +594,8 @@ static void rt2800usb_fill_rxdone(struct queue_entry *entry,
if (rt2x00_get_field32(rxd0, RXD_W0_CRC_ERROR)) if (rt2x00_get_field32(rxd0, RXD_W0_CRC_ERROR))
rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; 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 = rt2x00_get_field32(rxwi0, RXWI_W0_UDF); rxdesc->cipher_status = rt2x00_get_field32(rxd0, RXD_W0_CIPHER_ERROR);
rxdesc->cipher_status =
rt2x00_get_field32(rxd0, RXD_W0_CIPHER_ERROR);
}
if (rt2x00_get_field32(rxd0, RXD_W0_DECRYPTED)) { if (rt2x00_get_field32(rxd0, RXD_W0_DECRYPTED)) {
/* /*
......
...@@ -1968,12 +1968,8 @@ static void rt61pci_fill_rxdone(struct queue_entry *entry, ...@@ -1968,12 +1968,8 @@ static void rt61pci_fill_rxdone(struct queue_entry *entry,
if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR)) if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR))
rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; 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 = rxdesc->cipher_status = rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR);
rt2x00_get_field32(word0, RXD_W0_CIPHER_ALG);
rxdesc->cipher_status =
rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR);
}
if (rxdesc->cipher != CIPHER_NONE) { if (rxdesc->cipher != CIPHER_NONE) {
_rt2x00_desc_read(entry_priv->desc, 2, &rxdesc->iv[0]); _rt2x00_desc_read(entry_priv->desc, 2, &rxdesc->iv[0]);
......
...@@ -1644,12 +1644,8 @@ static void rt73usb_fill_rxdone(struct queue_entry *entry, ...@@ -1644,12 +1644,8 @@ static void rt73usb_fill_rxdone(struct queue_entry *entry,
if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR)) if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR))
rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; 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 = rxdesc->cipher_status = rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR);
rt2x00_get_field32(word0, RXD_W0_CIPHER_ALG);
rxdesc->cipher_status =
rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR);
}
if (rxdesc->cipher != CIPHER_NONE) { if (rxdesc->cipher != CIPHER_NONE) {
_rt2x00_desc_read(rxd, 2, &rxdesc->iv[0]); _rt2x00_desc_read(rxd, 2, &rxdesc->iv[0]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment