Netdev List
 help / color / mirror / Atom feed
* [RFC] [NET] restructure LL_MAX_HEADER code, increase headroom for 802.11
@ 2008-05-04 18:44 Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2008-05-04 18:44 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Herbert Xu

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) && \



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-04 18:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-04 18:44 [RFC] [NET] restructure LL_MAX_HEADER code, increase headroom for 802.11 Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox