netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Kimdon <david.kimdon@devicescape.com>
To: netdev@vger.kernel.org
Cc: "John W. Linville" <linville@tuxdriver.com>,
	Jiri Benc <jbenc@suse.cz>,
	David Kimdon <david.kimdon@devicescape.com>
Subject: [patch 1/3] d80211: use FCS_LEN instead of hardcoded number.
Date: Mon, 9 Oct 2006 10:02:49 -0700	[thread overview]
Message-ID: <20061009170249.GA27239@devicescape.com> (raw)
In-Reply-To: 20061009170159.804032000@devicescape.com

[-- Attachment #1: FCS_LEN.patch --]
[-- Type: text/plain, Size: 1070 bytes --]

Signed-off-by: David Kimdon <david.kimdon@devicescape.com>

Index: wireless-dev/net/d80211/ieee80211.c
===================================================================
--- wireless-dev.orig/net/d80211/ieee80211.c
+++ wireless-dev/net/d80211/ieee80211.c
@@ -451,7 +451,7 @@ ieee80211_tx_h_fragment(struct ieee80211
 
 	hdrlen = ieee80211_get_hdrlen(tx->fc);
 	payload_len = first->len - hdrlen;
-	per_fragm = frag_threshold - hdrlen - 4 /* FCS */;
+	per_fragm = frag_threshold - hdrlen - FCS_LEN;
 	num_fragm = (payload_len + per_fragm - 1) / per_fragm;
 
 	frags = kzalloc(num_fragm * sizeof(struct sk_buff *), GFP_ATOMIC);
@@ -1103,7 +1103,7 @@ __ieee80211_tx_prepare(struct ieee80211_
         control->no_ack = is_multicast_ether_addr(hdr->addr1);
 	tx->fragmented = local->fragmentation_threshold <
 		IEEE80211_MAX_FRAG_THRESHOLD && tx->u.tx.unicast &&
-		skb->len + 4 /* FCS */ > local->fragmentation_threshold &&
+		skb->len + FCS_LEN > local->fragmentation_threshold &&
 		(!local->hw->set_frag_threshold);
 	if (!tx->sta)
 		control->clear_dst_mask = 1;

--

       reply	other threads:[~2006-10-09 17:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20061009170159.804032000@devicescape.com>
2006-10-09 17:02 ` David Kimdon [this message]
2006-10-09 17:03 ` [patch 2/3] d80211: remove poorly documented ieee80211_hw extra_hdr_room flag David Kimdon
2006-10-10 10:00   ` Michael Buesch
2006-10-10 13:45     ` David Kimdon
2006-10-10 14:30       ` Michael Wu
2006-10-10 21:04       ` Michael Buesch
2006-10-11  0:37         ` David Kimdon
2006-10-09 17:03 ` [patch 3/3] d80211: silence sparse warning: bad constant expression David Kimdon
2006-10-09 20:11   ` David Kimdon
2006-10-18 13:56     ` Jiri Benc
2006-10-18 15:12       ` David Kimdon
2006-10-18 15:40         ` Jiri Benc

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=20061009170249.GA27239@devicescape.com \
    --to=david.kimdon@devicescape.com \
    --cc=jbenc@suse.cz \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).