All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sujith Manoharan <sujith@msujith.org>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [RFC 08/15] ath9k: Fix PHY error processing
Date: Mon, 12 Aug 2013 15:11:35 +0530	[thread overview]
Message-ID: <1376300502-2741-9-git-send-email-sujith@msujith.org> (raw)
In-Reply-To: <1376300502-2741-1-git-send-email-sujith@msujith.org>

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

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>
---
 drivers/net/wireless/ath/ath9k/recv.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 51e7d16..e18adde 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)
-- 
1.8.3.4


  parent reply	other threads:[~2013-08-12  9:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12  9:41 [RFC 00/15] ath9k patches Sujith Manoharan
2013-08-12  9:41 ` [RFC 01/15] ath9k: Add MAX_AMSDU to supported HT capabilities Sujith Manoharan
2013-08-13  9:44   ` Felix Fietkau
2013-08-13 10:14     ` Sujith Manoharan
2013-08-12  9:41 ` [RFC 02/15] ath9k: Use a subroutine to check for "mybeacon" Sujith Manoharan
2013-08-12  9:41 ` [RFC 03/15] ath9k: Fix phy error handling for DFS Sujith Manoharan
2013-08-12  9:41 ` [RFC 04/15] ath9k: Discard invalid frames early Sujith Manoharan
2013-08-12  9:41 ` [RFC 05/15] ath9k: Fix RX crypto processing Sujith Manoharan
2013-08-12  9:41 ` [RFC 06/15] ath9k: Fix TSF processing Sujith Manoharan
2013-08-12  9:41 ` [RFC 07/15] ath9k: Reorder some functions Sujith Manoharan
2013-08-12  9:41 ` Sujith Manoharan [this message]
2013-08-12  9:41 ` [RFC 09/15] ath9k: Fix RX debug statistics Sujith Manoharan
2013-08-12  9:41 ` [RFC 10/15] ath9k: Fix RX packet counter Sujith Manoharan
2013-08-12  9:41 ` [RFC 11/15] ath9k: Fix RX beacon processing Sujith Manoharan
2013-08-12  9:41 ` [RFC 12/15] ath9k: Move the RX poll check to preprocess() Sujith Manoharan
2013-08-12  9:41 ` [RFC 13/15] ath9k: Handle corrupt descriptors properly Sujith Manoharan
2013-08-12  9:41 ` [RFC 14/15] ath9k: Fix error condition for corrupt descriptors Sujith Manoharan
2013-08-12  9:41 ` [RFC 15/15] ath9k: Remove unused function argument Sujith Manoharan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1376300502-2741-9-git-send-email-sujith@msujith.org \
    --to=sujith@msujith.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.