diff options
author | Mathy Vanhoef <vanhoefm@gmail.com> | 2014-06-14 01:14:56 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-07-01 14:26:25 -0400 |
commit | b76ff0d2e0aaf52adf0e7ec0625aa48a039cba23 (patch) | |
tree | be10e5aea4a6281419f62820e735f24173871b75 /drivers/net/wireless/ath | |
parent | 41881354f93a5e82f16c811f95e0700bf99283ec (diff) | |
download | op-kernel-dev-b76ff0d2e0aaf52adf0e7ec0625aa48a039cba23.zip op-kernel-dev-b76ff0d2e0aaf52adf0e7ec0625aa48a039cba23.tar.gz |
ath5k: capture CCK and OFDM restarts
Treat frames that underwent a CCK or OFDM restart as frames with an invalid CRC.
Signed-off-by: Mathy Vanhoef <vanhoefm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 5839a34..8ad2550 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -1462,7 +1462,20 @@ ath5k_receive_frame_ok(struct ath5k_hw *ah, struct ath5k_rx_status *rs) ah->stats.rxerr_phy++; if (rs->rs_phyerr > 0 && rs->rs_phyerr < 32) ah->stats.rxerr_phy_code[rs->rs_phyerr]++; - return false; + + /* + * 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; + } } if (rs->rs_status & AR5K_RXERR_DECRYPT) { /* |