From: Sujith Manoharan <sujith@msujith.org>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 04/14] ath9k: Fix RX crypto processing
Date: Wed, 14 Aug 2013 09:11:12 +0530 [thread overview]
Message-ID: <1376451682-25862-4-git-send-email-sujith@msujith.org> (raw)
In-Reply-To: <1376451682-25862-1-git-send-email-sujith@msujith.org>
From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
The keymiss events are valid only in the last descriptor
of a packet. Fix this by making sure that we return
early in case of chained descriptors.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/recv.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index f8cc2b3..b04a971 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -785,10 +785,6 @@ static bool ath9k_rx_accept(struct ath_common *common,
!test_bit(rx_stats->rs_keyix, common->ccmp_keymap))
rx_stats->rs_status &= ~ATH9K_RXERR_KEYMISS;
- /* Only use error bits from the last fragment */
- if (rx_stats->rs_more)
- return true;
-
mic_error = is_valid_tkip && !ieee80211_is_ctl(fc) &&
!ieee80211_has_morefrags(fc) &&
!(le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) &&
@@ -959,6 +955,10 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc,
return -EINVAL;
}
+ /* Only use status info from the last fragment */
+ if (rx_stats->rs_more)
+ return 0;
+
/*
* everything but the rate is checked here, the rate check is done
* separately to avoid doing two lookups for a rate for each frame.
@@ -966,10 +966,6 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc,
if (!ath9k_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error))
return -EINVAL;
- /* Only use status info from the last fragment */
- if (rx_stats->rs_more)
- return 0;
-
if (ath9k_process_rate(common, hw, rx_stats, rx_status))
return -EINVAL;
--
1.8.3.4
next prev parent reply other threads:[~2013-08-14 3:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 3:41 [PATCH 01/14] ath9k: Use a subroutine to check for "mybeacon" Sujith Manoharan
2013-08-14 3:41 ` [PATCH 02/14] ath9k: Fix phy error handling for DFS Sujith Manoharan
2013-08-14 3:41 ` [PATCH 03/14] ath9k: Discard invalid frames early Sujith Manoharan
2013-08-14 3:41 ` Sujith Manoharan [this message]
2013-08-14 3:41 ` [PATCH 05/14] ath9k: Fix TSF processing Sujith Manoharan
2013-08-14 3:41 ` [PATCH 06/14] ath9k: Reorder some functions Sujith Manoharan
2013-08-14 3:41 ` [PATCH 07/14] ath9k: Fix PHY error processing Sujith Manoharan
2013-08-14 3:41 ` [PATCH 08/14] ath9k: Fix RX debug statistics Sujith Manoharan
2013-08-14 3:41 ` [PATCH 09/14] ath9k: Fix RX packet counter Sujith Manoharan
2013-08-14 3:41 ` [PATCH 10/14] ath9k: Fix RX beacon processing Sujith Manoharan
2013-08-14 3:41 ` [PATCH 11/14] ath9k: Move the RX poll check to preprocess() Sujith Manoharan
2013-08-14 3:41 ` [PATCH 12/14] ath9k: Handle corrupt descriptors properly Sujith Manoharan
2013-08-14 3:41 ` [PATCH 13/14] ath9k: Fix error condition for corrupt descriptors Sujith Manoharan
2013-08-14 3:41 ` [PATCH 14/14] 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=1376451682-25862-4-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).