ath5k: support for FIF_FCSFAIL filter
When the FIF_FCSFAIL filter flag is set, pass frames with CRC errors. Signed-off-by: Mathy Vanhoef <vanhoefm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
c64800e772
commit
41881354f9
@@ -1382,6 +1382,9 @@ ath5k_receive_frame(struct ath5k_hw *ah, struct sk_buff *skb,
|
||||
rxs->flag = 0;
|
||||
if (unlikely(rs->rs_status & AR5K_RXERR_MIC))
|
||||
rxs->flag |= RX_FLAG_MMIC_ERROR;
|
||||
if (unlikely(rs->rs_status & AR5K_RXERR_CRC))
|
||||
rxs->flag |= RX_FLAG_FAILED_FCS_CRC;
|
||||
|
||||
|
||||
/*
|
||||
* always extend the mac timestamp, since this information is
|
||||
@@ -1449,6 +1452,8 @@ ath5k_receive_frame_ok(struct ath5k_hw *ah, struct ath5k_rx_status *rs)
|
||||
ah->stats.rx_bytes_count += rs->rs_datalen;
|
||||
|
||||
if (unlikely(rs->rs_status)) {
|
||||
unsigned int filters;
|
||||
|
||||
if (rs->rs_status & AR5K_RXERR_CRC)
|
||||
ah->stats.rxerr_crc++;
|
||||
if (rs->rs_status & AR5K_RXERR_FIFO)
|
||||
@@ -1480,8 +1485,15 @@ ath5k_receive_frame_ok(struct ath5k_hw *ah, struct ath5k_rx_status *rs)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* reject any frames with non-crypto errors */
|
||||
if (rs->rs_status & ~(AR5K_RXERR_DECRYPT))
|
||||
/*
|
||||
* Reject any frames with non-crypto errors, and take into account the
|
||||
* current FIF_* filters.
|
||||
*/
|
||||
filters = AR5K_RXERR_DECRYPT;
|
||||
if (ah->fif_filter_flags & FIF_FCSFAIL)
|
||||
filters |= AR5K_RXERR_CRC;
|
||||
|
||||
if (rs->rs_status & ~filters)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user