[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1209926641.3655.20.camel@johannes.berg>
Date: Sun, 04 May 2008 20:44:01 +0200
From: Johannes Berg <johannes@...solutions.net>
To: "David S. Miller" <davem@...emloft.net>
Cc: netdev <netdev@...r.kernel.org>,
Herbert Xu <herbert@...dor.apana.org.au>
Subject: [RFC] [NET] restructure LL_MAX_HEADER code, increase headroom for
802.11
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@...solutions.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) && \
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists