aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/ar9003_mac.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-12-28 09:46:16 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-01-04 14:43:01 -0500
commit1c30cc19081c16b1fe73ac13f2cb2abc009cdcc4 (patch)
treeaf987d6d649b6dc221e098147b81b8d0523916de /drivers/net/wireless/ath/ath9k/ar9003_mac.c
parent1e1f4ad25fab29ca48b1166e74a81e9c89ddf0fb (diff)
ath9k_hw: fix dma descriptor rx error bit parsing
An Rx DMA descriptor can have multiple error bits set, and some error bits (e.g. MIC failure) are filtered by the driver based on other criteria. Remove the 'else' in various error bit checks so that all error information is properly passed to the driver. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_mac.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_mac.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
index b6e4ee48ef78..4ceddbbdfcee 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
@@ -613,9 +613,9 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
613 * possibly be reviewing the last subframe. AR_CRCErr 613 * possibly be reviewing the last subframe. AR_CRCErr
614 * is the CRC of the actual data. 614 * is the CRC of the actual data.
615 */ 615 */
616 if (rxsp->status11 & AR_CRCErr) { 616 if (rxsp->status11 & AR_CRCErr)
617 rxs->rs_status |= ATH9K_RXERR_CRC; 617 rxs->rs_status |= ATH9K_RXERR_CRC;
618 } else if (rxsp->status11 & AR_PHYErr) { 618 if (rxsp->status11 & AR_PHYErr) {
619 phyerr = MS(rxsp->status11, AR_PHYErrCode); 619 phyerr = MS(rxsp->status11, AR_PHYErrCode);
620 /* 620 /*
621 * If we reach a point here where AR_PostDelimCRCErr is 621 * If we reach a point here where AR_PostDelimCRCErr is
@@ -638,11 +638,12 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
638 rxs->rs_phyerr = phyerr; 638 rxs->rs_phyerr = phyerr;
639 } 639 }
640 640
641 } else if (rxsp->status11 & AR_DecryptCRCErr) { 641 }
642 if (rxsp->status11 & AR_DecryptCRCErr)
642 rxs->rs_status |= ATH9K_RXERR_DECRYPT; 643 rxs->rs_status |= ATH9K_RXERR_DECRYPT;
643 } else if (rxsp->status11 & AR_MichaelErr) { 644 if (rxsp->status11 & AR_MichaelErr)
644 rxs->rs_status |= ATH9K_RXERR_MIC; 645 rxs->rs_status |= ATH9K_RXERR_MIC;
645 } else if (rxsp->status11 & AR_KeyMiss) 646 if (rxsp->status11 & AR_KeyMiss)
646 rxs->rs_status |= ATH9K_RXERR_DECRYPT; 647 rxs->rs_status |= ATH9K_RXERR_DECRYPT;
647 } 648 }
648 649