aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_mac.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
index 06ef71019c12..5b995bee70ae 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
@@ -579,12 +579,39 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
579 rxs->rs_flags |= ATH9K_RX_DECRYPT_BUSY; 579 rxs->rs_flags |= ATH9K_RX_DECRYPT_BUSY;
580 580
581 if ((rxsp->status11 & AR_RxFrameOK) == 0) { 581 if ((rxsp->status11 & AR_RxFrameOK) == 0) {
582 /*
583 * AR_CRCErr will bet set to true if we're on the last
584 * subframe and the AR_PostDelimCRCErr is caught.
585 * In a way this also gives us a guarantee that when
586 * (!(AR_CRCErr) && (AR_PostDelimCRCErr)) we cannot
587 * possibly be reviewing the last subframe. AR_CRCErr
588 * is the CRC of the actual data.
589 */
582 if (rxsp->status11 & AR_CRCErr) { 590 if (rxsp->status11 & AR_CRCErr) {
583 rxs->rs_status |= ATH9K_RXERR_CRC; 591 rxs->rs_status |= ATH9K_RXERR_CRC;
584 } else if (rxsp->status11 & AR_PHYErr) { 592 } else if (rxsp->status11 & AR_PHYErr) {
585 rxs->rs_status |= ATH9K_RXERR_PHY;
586 phyerr = MS(rxsp->status11, AR_PHYErrCode); 593 phyerr = MS(rxsp->status11, AR_PHYErrCode);
587 rxs->rs_phyerr = phyerr; 594 /*
595 * If we reach a point here where AR_PostDelimCRCErr is
596 * true it implies we're *not* on the last subframe. In
597 * in that case that we know already that the CRC of
598 * the frame was OK, and MAC would send an ACK for that
599 * subframe, even if we did get a phy error of type
600 * ATH9K_PHYERR_OFDM_RESTART. This is only applicable
601 * to frame that are prior to the last subframe.
602 * The AR_PostDelimCRCErr is the CRC for the MPDU
603 * delimiter, which contains the 4 reserved bits,
604 * the MPDU length (12 bits), and follows the MPDU
605 * delimiter for an A-MPDU subframe (0x4E = 'N' ASCII).
606 */
607 if ((phyerr == ATH9K_PHYERR_OFDM_RESTART) &&
608 (rxsp->status11 & AR_PostDelimCRCErr)) {
609 rxs->rs_phyerr = 0;
610 } else {
611 rxs->rs_status |= ATH9K_RXERR_PHY;
612 rxs->rs_phyerr = phyerr;
613 }
614
588 } else if (rxsp->status11 & AR_DecryptCRCErr) { 615 } else if (rxsp->status11 & AR_DecryptCRCErr) {
589 rxs->rs_status |= ATH9K_RXERR_DECRYPT; 616 rxs->rs_status |= ATH9K_RXERR_DECRYPT;
590 } else if (rxsp->status11 & AR_MichaelErr) { 617 } else if (rxsp->status11 & AR_MichaelErr) {