Netdev List
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>
Subject: [RFC] [NET] restructure LL_MAX_HEADER code, increase headroom for 802.11
Date: Sun, 04 May 2008 20:44:01 +0200	[thread overview]
Message-ID: <1209926641.3655.20.camel@johannes.berg> (raw)

This adds new default headroom for 802.11 and restructures the defines
there to be more readable using #elif.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 include/linux/netdevice.h |   20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

--- everything.orig/include/linux/netdevice.h	2008-05-04 13:21:27.000000000 +0200
+++ everything/include/linux/netdevice.h	2008-05-04 13:22:34.000000000 +0200
@@ -91,16 +91,26 @@ struct wireless_dev;
 /*
  *	Compute the worst case header length according to the protocols
  *	used.
+ *
+ *	These must be ordered by decreasing size for obvious reasons.
  */
  
-#if !defined(CONFIG_AX25) && !defined(CONFIG_AX25_MODULE) && !defined(CONFIG_TR)
-#define LL_MAX_HEADER	32
-#else
 #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
 #define LL_MAX_HEADER	96
-#else
+#elif defined(MAC80211_MESH)
+/* 802.11 (see below) plus 6-byte mesh header */
+#define LL_MAX_HEADER	54
+#elif defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_module)
+/*
+ * ctl (2), seq (2), addr1 (6), addr2 (6), addr3 (6),
+ * seq (2), addr4 (2), qos (2), extended IV (8),
+ * rfc1042/bridge tunnel (8)
+ */
 #define LL_MAX_HEADER	48
-#endif
+#elif defined(CONFIG_TR)
+#define LL_MAX_HEADER	48
+#else
+#define LL_MAX_HEADER	32
 #endif
 
 #if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \



                 reply	other threads:[~2008-05-04 18:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1209926641.3655.20.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --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