aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_txrx.c45
1 files changed, 8 insertions, 37 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 6bd7ef8818af..8aba265b4802 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -974,6 +974,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
974 struct ath_htc_rx_status *rxstatus; 974 struct ath_htc_rx_status *rxstatus;
975 struct ath_rx_status rx_stats; 975 struct ath_rx_status rx_stats;
976 int hdrlen, padsize; 976 int hdrlen, padsize;
977 bool decrypt_error;
977 __le16 fc; 978 __le16 fc;
978 979
979 if (skb->len < HTC_RX_FRAME_HEADER_SIZE) { 980 if (skb->len < HTC_RX_FRAME_HEADER_SIZE) {
@@ -1012,43 +1013,13 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
1012 1013
1013 rx_status_htc_to_ath(&rx_stats, &rxbuf->rxstatus); 1014 rx_status_htc_to_ath(&rx_stats, &rxbuf->rxstatus);
1014 1015
1015 if (rxbuf->rxstatus.rs_status != 0) { 1016 /*
1016 if (rxbuf->rxstatus.rs_status & ATH9K_RXERR_CRC) 1017 * everything but the rate is checked here, the rate check is done
1017 rx_status->flag |= RX_FLAG_FAILED_FCS_CRC; 1018 * separately to avoid doing two lookups for a rate for each frame.
1018 if (rxbuf->rxstatus.rs_status & ATH9K_RXERR_PHY) 1019 */
1019 goto rx_next; 1020 if (!ath9k_cmn_rx_accept(common, hdr, rx_status, &rx_stats,
1020 1021 &decrypt_error, priv->rxfilter))
1021 if (rxbuf->rxstatus.rs_status & ATH9K_RXERR_DECRYPT) { 1022 goto rx_next;
1022 /* FIXME */
1023 } else if (rxbuf->rxstatus.rs_status & ATH9K_RXERR_MIC) {
1024 if (ieee80211_is_ctl(fc))
1025 /*
1026 * Sometimes, we get invalid
1027 * MIC failures on valid control frames.
1028 * Remove these mic errors.
1029 */
1030 rxbuf->rxstatus.rs_status &= ~ATH9K_RXERR_MIC;
1031 else
1032 rx_status->flag |= RX_FLAG_MMIC_ERROR;
1033 }
1034
1035 /*
1036 * Reject error frames with the exception of
1037 * decryption and MIC failures. For monitor mode,
1038 * we also ignore the CRC error.
1039 */
1040 if (priv->ah->opmode == NL80211_IFTYPE_MONITOR) {
1041 if (rxbuf->rxstatus.rs_status &
1042 ~(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC |
1043 ATH9K_RXERR_CRC))
1044 goto rx_next;
1045 } else {
1046 if (rxbuf->rxstatus.rs_status &
1047 ~(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC)) {
1048 goto rx_next;
1049 }
1050 }
1051 }
1052 1023
1053 if (!(rxbuf->rxstatus.rs_status & ATH9K_RXERR_DECRYPT)) { 1024 if (!(rxbuf->rxstatus.rs_status & ATH9K_RXERR_DECRYPT)) {
1054 u8 keyix; 1025 u8 keyix;