提交 b76ff0d2 编写于 作者: M Mathy Vanhoef 提交者: John W. Linville

ath5k: capture CCK and OFDM restarts

Treat frames that underwent a CCK or OFDM restart as frames with an invalid CRC.
Signed-off-by: NMathy Vanhoef <vanhoefm@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 41881354
...@@ -1462,8 +1462,21 @@ ath5k_receive_frame_ok(struct ath5k_hw *ah, struct ath5k_rx_status *rs) ...@@ -1462,8 +1462,21 @@ ath5k_receive_frame_ok(struct ath5k_hw *ah, struct ath5k_rx_status *rs)
ah->stats.rxerr_phy++; ah->stats.rxerr_phy++;
if (rs->rs_phyerr > 0 && rs->rs_phyerr < 32) if (rs->rs_phyerr > 0 && rs->rs_phyerr < 32)
ah->stats.rxerr_phy_code[rs->rs_phyerr]++; ah->stats.rxerr_phy_code[rs->rs_phyerr]++;
/*
* Treat packets that underwent a CCK or OFDM reset as having a bad CRC.
* These restarts happen when the radio resynchronizes to a stronger frame
* while receiving a weaker frame. Here we receive the prefix of the weak
* frame. Since these are incomplete packets, mark their CRC as invalid.
*/
if (rs->rs_phyerr == AR5K_RX_PHY_ERROR_OFDM_RESTART ||
rs->rs_phyerr == AR5K_RX_PHY_ERROR_CCK_RESTART) {
rs->rs_status |= AR5K_RXERR_CRC;
rs->rs_status &= ~AR5K_RXERR_PHY;
} else {
return false; return false;
} }
}
if (rs->rs_status & AR5K_RXERR_DECRYPT) { if (rs->rs_status & AR5K_RXERR_DECRYPT) {
/* /*
* Decrypt error. If the error occurred * Decrypt error. If the error occurred
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册