Skip to content

Commit 8388e3d

Browse files
committed
net: Set LL_MAX_HEADER properly for wireless.
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 <[email protected]>
1 parent f403ede commit 8388e3d

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

include/linux/netdevice.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,16 @@ struct wireless_dev;
9393
* used.
9494
*/
9595

96-
#if !defined(CONFIG_AX25) && !defined(CONFIG_AX25_MODULE) && !defined(CONFIG_TR)
97-
#define LL_MAX_HEADER 32
96+
#if defined(CONFIG_WLAN_80211) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
97+
# if defined(CONFIG_MAC80211_MESH)
98+
# define LL_MAX_HEADER 128
99+
# else
100+
# define LL_MAX_HEADER 96
101+
# endif
102+
#elif defined(CONFIG_TR)
103+
# define LL_MAX_HEADER 48
98104
#else
99-
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
100-
#define LL_MAX_HEADER 96
101-
#else
102-
#define LL_MAX_HEADER 48
103-
#endif
105+
# define LL_MAX_HEADER 32
104106
#endif
105107

106108
#if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \

0 commit comments

Comments
 (0)