public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.30] mac80211: correct fragmentation threshold check
@ 2009-04-29 21:35 Johannes Berg
  2009-04-30 18:29 ` John W. Linville
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2009-04-29 21:35 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, Michael Buesch

The fragmentation threshold is defined to be including the
FCS, and the code that sets the TX_FRAGMENTED flag correctly
accounts for those four bytes. The code that verifies this
doesn't though, which could lead to spurious warnings and
frames being dropped although everything is ok. Correct the
code by accounting for the FCS.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 net/mac80211/tx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- wireless-testing.orig/net/mac80211/tx.c	2009-04-29 22:27:51.000000000 +0200
+++ wireless-testing/net/mac80211/tx.c	2009-04-29 22:28:35.000000000 +0200
@@ -788,7 +788,7 @@ ieee80211_tx_h_fragment(struct ieee80211
 	hdrlen = ieee80211_hdrlen(hdr->frame_control);
 
 	/* internal error, why is TX_FRAGMENTED set? */
-	if (WARN_ON(skb->len <= frag_threshold))
+	if (WARN_ON(skb->len + FCS_LEN <= frag_threshold))
 		return TX_DROP;
 
 	/*



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

* Re: [PATCH 2.6.30] mac80211: correct fragmentation threshold check
  2009-04-29 21:35 [PATCH 2.6.30] mac80211: correct fragmentation threshold check Johannes Berg
@ 2009-04-30 18:29 ` John W. Linville
  2009-04-30 18:37   ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: John W. Linville @ 2009-04-30 18:29 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Michael Buesch

Does there happen to be a bugzilla somewhere that corresponds to this?

On Wed, Apr 29, 2009 at 11:35:56PM +0200, Johannes Berg wrote:
> The fragmentation threshold is defined to be including the
> FCS, and the code that sets the TX_FRAGMENTED flag correctly
> accounts for those four bytes. The code that verifies this
> doesn't though, which could lead to spurious warnings and
> frames being dropped although everything is ok. Correct the
> code by accounting for the FCS.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
>  net/mac80211/tx.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- wireless-testing.orig/net/mac80211/tx.c	2009-04-29 22:27:51.000000000 +0200
> +++ wireless-testing/net/mac80211/tx.c	2009-04-29 22:28:35.000000000 +0200
> @@ -788,7 +788,7 @@ ieee80211_tx_h_fragment(struct ieee80211
>  	hdrlen = ieee80211_hdrlen(hdr->frame_control);
>  
>  	/* internal error, why is TX_FRAGMENTED set? */
> -	if (WARN_ON(skb->len <= frag_threshold))
> +	if (WARN_ON(skb->len + FCS_LEN <= frag_threshold))
>  		return TX_DROP;
>  
>  	/*
> 
> 
> 

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: [PATCH 2.6.30] mac80211: correct fragmentation threshold check
  2009-04-30 18:29 ` John W. Linville
@ 2009-04-30 18:37   ` Johannes Berg
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2009-04-30 18:37 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Michael Buesch

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

On Thu, 2009-04-30 at 14:29 -0400, John W. Linville wrote:
> Does there happen to be a bugzilla somewhere that corresponds to this?

No, Michael said he was running into this warning and this was the only
spot I could find... There's a mail somewhere:

http://article.gmane.org/gmane.linux.kernel.wireless.general/32205

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2009-04-30 18:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-29 21:35 [PATCH 2.6.30] mac80211: correct fragmentation threshold check Johannes Berg
2009-04-30 18:29 ` John W. Linville
2009-04-30 18:37   ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox