diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2013-08-14 09:11:15 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-15 16:08:03 -0400 |
commit | 6b87d71c1ad41a3d0402286534909d0dc6285a51 (patch) | |
tree | f4885117e372a09f2cd79642e948d75ba09cb3c0 /drivers | |
parent | 3105b67276f2d3b09669e0a2b1337c9d99f573bd (diff) |
ath9k: Fix PHY error processing
Parse the PHY error details only for the last fragment
in case descriptors are chained.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 51e7d16841d6..e18adde1df6c 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -803,8 +803,6 @@ static bool ath9k_rx_accept(struct ath_common *common, rxs->flag |= RX_FLAG_FAILED_FCS_CRC; mic_error = false; } - if (rx_stats->rs_status & ATH9K_RXERR_PHY) - return false; if ((rx_stats->rs_status & ATH9K_RXERR_DECRYPT) || (!is_mc && (rx_stats->rs_status & ATH9K_RXERR_KEYMISS))) { @@ -1088,6 +1086,18 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc, ath9k_process_tsf(rx_stats, rx_status, tsf); /* + * Process PHY errors and return so that the packet + * can be dropped. + */ + if (rx_stats->rs_status & ATH9K_RXERR_PHY) { + ath9k_dfs_process_phyerr(sc, hdr, rx_stats, rx_status->mactime); + if (ath_process_fft(sc, hdr, rx_stats, rx_status->mactime)) + RX_STAT_INC(rx_spectral); + + return -EINVAL; + } + + /* * everything but the rate is checked here, the rate check is done * separately to avoid doing two lookups for a rate for each frame. */ @@ -1265,15 +1275,6 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) rxs = IEEE80211_SKB_RXCB(hdr_skb); memset(rxs, 0, sizeof(struct ieee80211_rx_status)); - if (rs.rs_status & ATH9K_RXERR_PHY) { - ath9k_dfs_process_phyerr(sc, hdr, &rs, rxs->mactime); - - if (ath_process_fft(sc, hdr, &rs, rxs->mactime)) { - RX_STAT_INC(rx_spectral); - goto requeue_drop_frag; - } - } - retval = ath9k_rx_skb_preprocess(sc, hdr, &rs, rxs, &decrypt_error, tsf); if (retval) |