Linux wireless drivers development
 help / color / mirror / Atom feed
From: Bob Copeland <me@bobcopeland.com>
To: linville@tuxdriver.com, jirislaby@gmail.com, mickflemm@gmail.com,
	lrodriguez@atheros.com
Cc: linux-wireless@vger.kernel.org, ath5k-devel@lists.ath5k.org,
	Bob Copeland <me@bobcopeland.com>
Subject: [PATCH 4/6] ath5k: remove monitor check in receive_frame_ok filter
Date: Sun, 15 Aug 2010 13:03:13 -0400	[thread overview]
Message-ID: <1281891795-14718-5-git-send-email-me@bobcopeland.com> (raw)
In-Reply-To: <1281891795-14718-1-git-send-email-me@bobcopeland.com>

Monitor interfaces are never seen by the driver, so tests based on
that opmode don't make sense.  Also, we already pass all mic
failure packets.

Consequently this code is actually accepting any frames with just
crypto errors and rejecting those with CRC, FIFO, and PHY errors for
all interface types.  Adjust the code and comment accordingly.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
 drivers/net/wireless/ath/ath5k/base.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 9c49b8d..03808b8 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -2035,9 +2035,8 @@ ath5k_receive_frame_ok(struct ath5k_softc *sc, struct ath5k_rx_status *rs)
 			return true;
 		}
 
-		/* let crypto-error packets fall through in MNTR */
-		if ((rs->rs_status & ~(AR5K_RXERR_DECRYPT|AR5K_RXERR_MIC)) ||
-		    sc->opmode != NL80211_IFTYPE_MONITOR)
+		/* reject any frames with non-crypto errors */
+		if (rs->rs_status & ~(AR5K_RXERR_DECRYPT))
 			return false;
 	}
 
-- 
1.7.1.1



  parent reply	other threads:[~2010-08-15 17:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-15 17:03 [PATCH 0/6] ath5k cleanups and fixes Bob Copeland
2010-08-15 17:03 ` [PATCH 1/6] ath5k: rename ath5k_hw_set_associd to _set_bssid Bob Copeland
2010-08-15 17:03 ` [PATCH 2/6] ath5k: remove own (wrong) IEEE80211_MAX_LEN Bob Copeland
2010-08-15 17:03 ` [PATCH 3/6] ath5k: clean up some comments Bob Copeland
2010-08-15 17:03 ` Bob Copeland [this message]
2010-08-15 17:03 ` [PATCH 5/6] ath5k: remove all mention of monitor iftype Bob Copeland
2010-08-15 17:03 ` [PATCH 6/6] ath5k: don't enable probe request rx for STAs Bob Copeland

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=1281891795-14718-5-git-send-email-me@bobcopeland.com \
    --to=me@bobcopeland.com \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=jirislaby@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=lrodriguez@atheros.com \
    --cc=mickflemm@gmail.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