Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203713
b: refs/heads/master
c: 9171acc
h: refs/heads/master
i:
  203711: f0af2da
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Jul 16, 2010
1 parent cda2232 commit 98aa71b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15804e3e9de52f1baefad34233424488b5672853
refs/heads/master: 9171acc7e094b3ca88e624f39891a4f3bf9d083c
31 changes: 29 additions & 2 deletions trunk/drivers/net/wireless/ath/ath9k/ar9003_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,12 +579,39 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
rxs->rs_flags |= ATH9K_RX_DECRYPT_BUSY;

if ((rxsp->status11 & AR_RxFrameOK) == 0) {
/*
* AR_CRCErr will bet set to true if we're on the last
* subframe and the AR_PostDelimCRCErr is caught.
* In a way this also gives us a guarantee that when
* (!(AR_CRCErr) && (AR_PostDelimCRCErr)) we cannot
* possibly be reviewing the last subframe. AR_CRCErr
* is the CRC of the actual data.
*/
if (rxsp->status11 & AR_CRCErr) {
rxs->rs_status |= ATH9K_RXERR_CRC;
} else if (rxsp->status11 & AR_PHYErr) {
rxs->rs_status |= ATH9K_RXERR_PHY;
phyerr = MS(rxsp->status11, AR_PHYErrCode);
rxs->rs_phyerr = phyerr;
/*
* If we reach a point here where AR_PostDelimCRCErr is
* true it implies we're *not* on the last subframe. In
* in that case that we know already that the CRC of
* the frame was OK, and MAC would send an ACK for that
* subframe, even if we did get a phy error of type
* ATH9K_PHYERR_OFDM_RESTART. This is only applicable
* to frame that are prior to the last subframe.
* The AR_PostDelimCRCErr is the CRC for the MPDU
* delimiter, which contains the 4 reserved bits,
* the MPDU length (12 bits), and follows the MPDU
* delimiter for an A-MPDU subframe (0x4E = 'N' ASCII).
*/
if ((phyerr == ATH9K_PHYERR_OFDM_RESTART) &&
(rxsp->status11 & AR_PostDelimCRCErr)) {
rxs->rs_phyerr = 0;
} else {
rxs->rs_status |= ATH9K_RXERR_PHY;
rxs->rs_phyerr = phyerr;
}

} else if (rxsp->status11 & AR_DecryptCRCErr) {
rxs->rs_status |= ATH9K_RXERR_DECRYPT;
} else if (rxsp->status11 & AR_MichaelErr) {
Expand Down

0 comments on commit 98aa71b

Please sign in to comment.