aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_mac.c8
-rw-r--r--drivers/net/wireless/ath/ath9k/mac.c14
2 files changed, 14 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
index 4ceddbbdfcee..038a0cbfc6e7 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
@@ -615,7 +615,7 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
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 if (rxsp->status11 & AR_PHYErr) { 618 else 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,11 @@ 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 } 641 } else if (rxsp->status11 & AR_DecryptCRCErr)
642 if (rxsp->status11 & AR_DecryptCRCErr)
643 rxs->rs_status |= ATH9K_RXERR_DECRYPT; 642 rxs->rs_status |= ATH9K_RXERR_DECRYPT;
644 if (rxsp->status11 & AR_MichaelErr) 643 else if (rxsp->status11 & AR_MichaelErr)
645 rxs->rs_status |= ATH9K_RXERR_MIC; 644 rxs->rs_status |= ATH9K_RXERR_MIC;
645
646 if (rxsp->status11 & AR_KeyMiss) 646 if (rxsp->status11 & AR_KeyMiss)
647 rxs->rs_status |= ATH9K_RXERR_DECRYPT; 647 rxs->rs_status |= ATH9K_RXERR_DECRYPT;
648 } 648 }
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index 180170d3ce25..c75d40fb86f1 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -690,17 +690,23 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
690 rs->rs_flags |= ATH9K_RX_DECRYPT_BUSY; 690 rs->rs_flags |= ATH9K_RX_DECRYPT_BUSY;
691 691
692 if ((ads.ds_rxstatus8 & AR_RxFrameOK) == 0) { 692 if ((ads.ds_rxstatus8 & AR_RxFrameOK) == 0) {
693 /*
694 * Treat these errors as mutually exclusive to avoid spurious
695 * extra error reports from the hardware. If a CRC error is
696 * reported, then decryption and MIC errors are irrelevant,
697 * the frame is going to be dropped either way
698 */
693 if (ads.ds_rxstatus8 & AR_CRCErr) 699 if (ads.ds_rxstatus8 & AR_CRCErr)
694 rs->rs_status |= ATH9K_RXERR_CRC; 700 rs->rs_status |= ATH9K_RXERR_CRC;
695 if (ads.ds_rxstatus8 & AR_PHYErr) { 701 else if (ads.ds_rxstatus8 & AR_PHYErr) {
696 rs->rs_status |= ATH9K_RXERR_PHY; 702 rs->rs_status |= ATH9K_RXERR_PHY;
697 phyerr = MS(ads.ds_rxstatus8, AR_PHYErrCode); 703 phyerr = MS(ads.ds_rxstatus8, AR_PHYErrCode);
698 rs->rs_phyerr = phyerr; 704 rs->rs_phyerr = phyerr;
699 } 705 } else if (ads.ds_rxstatus8 & AR_DecryptCRCErr)
700 if (ads.ds_rxstatus8 & AR_DecryptCRCErr)
701 rs->rs_status |= ATH9K_RXERR_DECRYPT; 706 rs->rs_status |= ATH9K_RXERR_DECRYPT;
702 if (ads.ds_rxstatus8 & AR_MichaelErr) 707 else if (ads.ds_rxstatus8 & AR_MichaelErr)
703 rs->rs_status |= ATH9K_RXERR_MIC; 708 rs->rs_status |= ATH9K_RXERR_MIC;
709
704 if (ads.ds_rxstatus8 & AR_KeyMiss) 710 if (ads.ds_rxstatus8 & AR_KeyMiss)
705 rs->rs_status |= ATH9K_RXERR_DECRYPT; 711 rs->rs_status |= ATH9K_RXERR_DECRYPT;
706 } 712 }