netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Benc <jbenc@suse.cz>
To: NetDev <netdev@oss.sgi.com>
Cc: LKML <linux-kernel@vger.kernel.org>, jgarzik@pobox.com, pavel@suse.cz
Subject: [3/5] netdev: HH_DATA_OFF bugfix
Date: Tue, 24 May 2005 15:12:04 +0200	[thread overview]
Message-ID: <20050524151204.554f73cb@griffin.suse.cz> (raw)
In-Reply-To: <20050524150711.01632672@griffin.suse.cz>

When the hardware header size is a multiple of HH_DATA_MOD, HH_DATA_OFF()
incorrectly returns HH_DATA_MOD (instead of 0).

Signed-off-by: Jiri Benc <jbenc@suse.cz>

--- linux/include/linux/netdevice.h
+++ work/include/linux/netdevice.h
@@ -204,7 +209,7 @@
 	/* cached hardware header; allow for machine alignment needs.        */
 #define HH_DATA_MOD	16
 #define HH_DATA_OFF(__len) \
-	(HH_DATA_MOD - ((__len) & (HH_DATA_MOD - 1)))
+	(HH_DATA_MOD - (((__len - 1) & (HH_DATA_MOD - 1)) + 1))
 #define HH_DATA_ALIGN(__len) \
 	(((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1))
 	unsigned long	hh_data[HH_DATA_ALIGN(LL_MAX_HEADER) / sizeof(long)];


--
Jiri Benc
SUSE Labs

  parent reply	other threads:[~2005-05-24 13:12 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-24 13:07 [0/5] Improvements to the ieee80211 layer Jiri Benc
2005-05-24 13:10 ` [1/5] ieee80211: cleanup Jiri Benc
2005-05-28  2:43   ` Jeff Garzik
2005-05-24 13:11 ` [2/5] ieee80211: ieee80211_device alignment fix and cleanup Jiri Benc
2005-05-28  3:37   ` Jeff Garzik
2005-05-31 13:30     ` Jiri Benc
2005-05-24 13:12 ` Jiri Benc [this message]
2005-05-28  3:15   ` [3/5] netdev: HH_DATA_OFF bugfix Jeff Garzik
2005-05-24 13:12 ` [4/5] ieee80211: ethernet independency Jiri Benc
2005-05-24 13:13 ` [5/5] ieee80211: add sequence numbers Jiri Benc
2005-05-24 13:15 ` [1-2/6] ipw2100, ipw2200: patches to merge to kernel Jiri Benc
2005-05-24 17:24   ` Dave Jones
2005-05-24 17:56     ` Thomas Graf
2005-05-24 13:16 ` [3/6] ipw2100: fix after "ieee80211: cleanup" Jiri Benc
2005-05-24 13:18 ` [4/6] ipw2100: fix after "ieee80211_device alignment fix" Jiri Benc
2005-05-24 18:58   ` Pavel Machek
2005-05-24 19:18     ` Jirka Bohac
2005-05-24 13:19 ` [5/6] ipw2200: " Jiri Benc
2005-05-24 13:20 ` [6/6] ipw2200: fix after "ieee80211: ethernet independency" Jiri Benc
2005-05-24 18:52 ` [0/5] Improvements to the ieee80211 layer Pavel Machek
2005-05-25  8:29   ` Jirka Bohac
2005-05-25  9:27     ` Pavel Machek
2005-05-25  9:42       ` Jiri Benc
2005-05-25  6:55 ` Zhu Yi
2005-05-25 11:20   ` Jiri Benc
2005-05-26  3:36     ` Zhu Yi
2005-05-28  3:18 ` Jeff Garzik

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=20050524151204.554f73cb@griffin.suse.cz \
    --to=jbenc@suse.cz \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=pavel@suse.cz \
    /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).