Skip to content

Commit

Permalink
net: Set LL_MAX_HEADER properly for wireless.
Browse files Browse the repository at this point in the history
Wireless networking, particularly with MESH enabled, has
quite strong requirements for link-layer header space.

Based upon some numbers and descriptions from Johannes Berg
we use 96 (same as AX25) for plain wireless, and with
mesh enabled we use 128.

In the process, simplify the cpp conditional logic here by
ordering the cases by those needing the most space down
to those needing the least case.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
davem330 committed May 13, 2008
1 parent f403ede commit 8388e3d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,16 @@ struct wireless_dev;
* used.
*/

#if !defined(CONFIG_AX25) && !defined(CONFIG_AX25_MODULE) && !defined(CONFIG_TR)
#define LL_MAX_HEADER 32
#if defined(CONFIG_WLAN_80211) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
# if defined(CONFIG_MAC80211_MESH)
# define LL_MAX_HEADER 128
# else
# define LL_MAX_HEADER 96
# endif
#elif defined(CONFIG_TR)
# define LL_MAX_HEADER 48
#else
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#define LL_MAX_HEADER 96
#else
#define LL_MAX_HEADER 48
#endif
# define LL_MAX_HEADER 32
#endif

#if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \
Expand Down

0 comments on commit 8388e3d

Please sign in to comment.