linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V3] mac80211: Turn off meaningless TKIP message when  software WEP encryption is used
@ 2007-08-13 22:13 Larry Finger
  2007-08-13 22:54 ` Ivo van Doorn
  2007-08-15  0:16 ` Johannes Berg
  0 siblings, 2 replies; 11+ messages in thread
From: Larry Finger @ 2007-08-13 22:13 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

For drivers that do no hardware encryption/decryption, WEP encryption
works as long as IEEE80211_HW_INCLUDE_IV is not set in the flags variable.
With WPA encryption and IEEE80211_HW_INCLUDE_IV not set, the logs are full
of TKIP decrypt failure messages. Despite the messages, RX is working.
This patch turns off the message for this case.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---

John,

Your suggestion to net_ratelimit the output is a good one. I hope the 3rd
time is a charm. I cannot believe that I'm still getting & and && confused.
At least I'm now getting = and == right (most of the time). FORTRAN IV didn't
have these complications!!

Larry
 
 wpa.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Index: wireless-legacy/net/mac80211/wpa.c
===================================================================
--- wireless-legacy.orig/net/mac80211/wpa.c
+++ wireless-legacy/net/mac80211/wpa.c
@@ -516,9 +516,12 @@ ieee80211_rx_h_tkip_decrypt(struct ieee8
 					  skb->len - hdrlen, rx->sta->addr,
 					  hwaccel, rx->u.rx.queue);
 	if (res != TKIP_DECRYPT_OK || wpa_test) {
-		printk(KERN_DEBUG "%s: TKIP decrypt failed for RX frame from "
-		       MAC_FMT " (res=%d)\n",
-		       rx->dev->name, MAC_ARG(rx->sta->addr), res);
+		if ((rx->local->hw.flags & IEEE80211_HW_WEP_INCLUDE_IV)
+		     && net_ratelimit()) {
+			printk(KERN_DEBUG "%s: TKIP decrypt failed for RX frame from "
+			       MAC_FMT " (res=%d)\n",
+			       rx->dev->name, MAC_ARG(rx->sta->addr), res);
+		}
 		return TXRX_DROP;
 	}
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-08-21 10:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-13 22:13 [PATCH V3] mac80211: Turn off meaningless TKIP message when software WEP encryption is used Larry Finger
2007-08-13 22:54 ` Ivo van Doorn
2007-08-13 23:13   ` Larry Finger
2007-08-13 23:58     ` Michael Wu
2007-08-14  0:24       ` Larry Finger
2007-08-20 17:55       ` Ivo van Doorn
2007-08-21 10:17         ` Johannes Berg
2007-08-15  0:16 ` Johannes Berg
2007-08-15 13:16   ` Larry Finger
2007-08-15 13:30     ` Johannes Berg
2007-08-16 22:32     ` Johannes Berg

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).