diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 35 | ||||
-rw-r--r-- | include/net/irda/discovery.h | 3 | ||||
-rw-r--r-- | include/net/syncppp.h | 2 |
3 files changed, 27 insertions, 13 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7c1d4466583b..b11e6e19e96c 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -93,14 +93,16 @@ struct wireless_dev; | |||
93 | * used. | 93 | * used. |
94 | */ | 94 | */ |
95 | 95 | ||
96 | #if !defined(CONFIG_AX25) && !defined(CONFIG_AX25_MODULE) && !defined(CONFIG_TR) | 96 | #if defined(CONFIG_WLAN_80211) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) |
97 | #define LL_MAX_HEADER 32 | 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 | ||
98 | #else | 104 | #else |
99 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | 105 | # define LL_MAX_HEADER 32 |
100 | #define LL_MAX_HEADER 96 | ||
101 | #else | ||
102 | #define LL_MAX_HEADER 48 | ||
103 | #endif | ||
104 | #endif | 106 | #endif |
105 | 107 | ||
106 | #if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \ | 108 | #if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \ |
@@ -244,11 +246,16 @@ struct hh_cache | |||
244 | * | 246 | * |
245 | * We could use other alignment values, but we must maintain the | 247 | * We could use other alignment values, but we must maintain the |
246 | * relationship HH alignment <= LL alignment. | 248 | * relationship HH alignment <= LL alignment. |
249 | * | ||
250 | * LL_ALLOCATED_SPACE also takes into account the tailroom the device | ||
251 | * may need. | ||
247 | */ | 252 | */ |
248 | #define LL_RESERVED_SPACE(dev) \ | 253 | #define LL_RESERVED_SPACE(dev) \ |
249 | (((dev)->hard_header_len&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) | 254 | ((((dev)->hard_header_len+(dev)->needed_headroom)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) |
250 | #define LL_RESERVED_SPACE_EXTRA(dev,extra) \ | 255 | #define LL_RESERVED_SPACE_EXTRA(dev,extra) \ |
251 | ((((dev)->hard_header_len+extra)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) | 256 | ((((dev)->hard_header_len+(dev)->needed_headroom+(extra))&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) |
257 | #define LL_ALLOCATED_SPACE(dev) \ | ||
258 | ((((dev)->hard_header_len+(dev)->needed_headroom+(dev)->needed_tailroom)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) | ||
252 | 259 | ||
253 | struct header_ops { | 260 | struct header_ops { |
254 | int (*create) (struct sk_buff *skb, struct net_device *dev, | 261 | int (*create) (struct sk_buff *skb, struct net_device *dev, |
@@ -567,6 +574,13 @@ struct net_device | |||
567 | unsigned short type; /* interface hardware type */ | 574 | unsigned short type; /* interface hardware type */ |
568 | unsigned short hard_header_len; /* hardware hdr length */ | 575 | unsigned short hard_header_len; /* hardware hdr length */ |
569 | 576 | ||
577 | /* extra head- and tailroom the hardware may need, but not in all cases | ||
578 | * can this be guaranteed, especially tailroom. Some cases also use | ||
579 | * LL_MAX_HEADER instead to allocate the skb. | ||
580 | */ | ||
581 | unsigned short needed_headroom; | ||
582 | unsigned short needed_tailroom; | ||
583 | |||
570 | struct net_device *master; /* Pointer to master device of a group, | 584 | struct net_device *master; /* Pointer to master device of a group, |
571 | * which this device is member of. | 585 | * which this device is member of. |
572 | */ | 586 | */ |
@@ -715,6 +729,9 @@ struct net_device | |||
715 | struct net *nd_net; | 729 | struct net *nd_net; |
716 | #endif | 730 | #endif |
717 | 731 | ||
732 | /* mid-layer private */ | ||
733 | void *ml_priv; | ||
734 | |||
718 | /* bridge stuff */ | 735 | /* bridge stuff */ |
719 | struct net_bridge_port *br_port; | 736 | struct net_bridge_port *br_port; |
720 | /* macvlan */ | 737 | /* macvlan */ |
diff --git a/include/net/irda/discovery.h b/include/net/irda/discovery.h index e4efad1f9eff..0ce93398720d 100644 --- a/include/net/irda/discovery.h +++ b/include/net/irda/discovery.h | |||
@@ -57,9 +57,6 @@ typedef union { | |||
57 | __u8 byte[2]; | 57 | __u8 byte[2]; |
58 | } __u16_host_order; | 58 | } __u16_host_order; |
59 | 59 | ||
60 | /* Same purpose, different application */ | ||
61 | #define u16ho(array) (* ((__u16 *) array)) | ||
62 | |||
63 | /* Types of discovery */ | 60 | /* Types of discovery */ |
64 | typedef enum { | 61 | typedef enum { |
65 | DISCOVERY_LOG, /* What's in our discovery log */ | 62 | DISCOVERY_LOG, /* What's in our discovery log */ |
diff --git a/include/net/syncppp.h b/include/net/syncppp.h index 877efa434700..e43f4070d892 100644 --- a/include/net/syncppp.h +++ b/include/net/syncppp.h | |||
@@ -59,7 +59,7 @@ struct ppp_device | |||
59 | 59 | ||
60 | static inline struct sppp *sppp_of(struct net_device *dev) | 60 | static inline struct sppp *sppp_of(struct net_device *dev) |
61 | { | 61 | { |
62 | struct ppp_device **ppp = dev->priv; | 62 | struct ppp_device **ppp = dev->ml_priv; |
63 | BUG_ON((*ppp)->dev != dev); | 63 | BUG_ON((*ppp)->dev != dev); |
64 | return &(*ppp)->sppp; | 64 | return &(*ppp)->sppp; |
65 | } | 65 | } |