Skip to content

Commit

Permalink
mac80211: correct fragmentation threshold check
Browse files Browse the repository at this point in the history
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.

(JWL -- The problem is described here:
 http://article.gmane.org/gmane.linux.kernel.wireless.general/32205 )

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed May 4, 2009
1 parent 3ee59f8 commit 8ccd8f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx)
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;

/*
Expand Down

0 comments on commit 8ccd8f2

Please sign in to comment.