@@ -1133,8 +1133,9 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar,
bool has_fcs_err;
bool has_crypto_err;
bool has_tkip_err;
- bool has_idx_invalid;
+ bool has_peer_idx_invalid;
bool is_decrypted;
+ u32 attention;
if (skb_queue_empty(amsdu))
return;
@@ -1162,14 +1163,12 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar,
/* Some attention flags are valid only in the last MSDU. */
last = skb_peek_tail(amsdu);
rxd = (void *)last->data - sizeof(*rxd);
- has_fcs_err = !!(rxd->attention.flags &
- __cpu_to_le32(RX_ATTENTION_FLAGS_FCS_ERR));
- has_crypto_err = !!(rxd->attention.flags &
- __cpu_to_le32(RX_ATTENTION_FLAGS_DECRYPT_ERR));
- has_tkip_err = !!(rxd->attention.flags &
- __cpu_to_le32(RX_ATTENTION_FLAGS_TKIP_MIC_ERR));
- has_idx_invalid = !!(rxd->attention.flags &
- __cpu_to_le32(RX_ATTENTION_FLAGS_PEER_IDX_INVALID));
+ attention = __le32_to_cpu(rxd->attention.flags);
+
+ has_fcs_err = !!(attention & RX_ATTENTION_FLAGS_FCS_ERR);
+ has_crypto_err = !!(attention & RX_ATTENTION_FLAGS_DECRYPT_ERR);
+ has_tkip_err = !!(attention & RX_ATTENTION_FLAGS_TKIP_MIC_ERR);
+ has_peer_idx_invalid = !!(attention & RX_ATTENTION_FLAGS_PEER_IDX_INVALID);
/* Note: If hardware captures an encrypted frame that it can't decrypt,
* e.g. due to fcs error, missing peer or invalid key data it will
@@ -1178,7 +1177,7 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar,
is_decrypted = (enctype != HTT_RX_MPDU_ENCRYPT_NONE &&
!has_fcs_err &&
!has_crypto_err &&
- !has_idx_invalid);
+ !has_peer_idx_invalid);
/* Clear per-MPDU flags while leaving per-PPDU flags intact. */
status->flag &= ~(RX_FLAG_FAILED_FCS_CRC |