linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Turn off meaningless TKIP message when software WEP encryption is used
@ 2007-08-13 19:26 Larry Finger
  2007-08-13 19:35 ` John W. Linville
  0 siblings, 1 reply; 2+ messages in thread
From: Larry Finger @ 2007-08-13 19:26 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>
---

 wpa.c |    8 +++++---
 1 file changed, 5 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,11 @@ 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)) {
+			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] 2+ messages in thread

* Re: [PATCH] mac80211: Turn off meaningless TKIP message when  software WEP encryption is used
  2007-08-13 19:26 [PATCH] mac80211: Turn off meaningless TKIP message when software WEP encryption is used Larry Finger
@ 2007-08-13 19:35 ` John W. Linville
  0 siblings, 0 replies; 2+ messages in thread
From: John W. Linville @ 2007-08-13 19:35 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless

On Mon, Aug 13, 2007 at 02:26:26PM -0500, Larry Finger wrote:

> --- wireless-legacy.orig/net/mac80211/wpa.c
> +++ wireless-legacy/net/mac80211/wpa.c
> @@ -516,9 +516,11 @@ 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)) {
> +			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;
>  	}

Since you are in there anyway, should this be rate limited?

John
-- 
John W. Linville
linville@tuxdriver.com

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

end of thread, other threads:[~2007-08-13 20:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-13 19:26 [PATCH] mac80211: Turn off meaningless TKIP message when software WEP encryption is used Larry Finger
2007-08-13 19:35 ` John W. Linville

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