aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-10-09 04:40:57 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:52 -0400
commit3b04ddde02cf1b6f14f2697da5c20eca5715017f (patch)
tree9da1341a5a399a507b5ea6bf5a3047506b8d8f8f /include/net
parentb95cce3576813ac3f86bafa6b5daaaaf7574b0fe (diff)
[NET]: Move hardware header operations out of netdevice.
Since hardware header operations are part of the protocol class not the device instance, make them into a separate object and save memory. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ax25.h5
-rw-r--r--include/net/pkt_sched.h5
2 files changed, 6 insertions, 4 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 99a4e364c74a..4e3cd93f81fc 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -363,8 +363,11 @@ extern int ax25_rx_iframe(ax25_cb *, struct sk_buff *);
363extern int ax25_kiss_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); 363extern int ax25_kiss_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *);
364 364
365/* ax25_ip.c */ 365/* ax25_ip.c */
366extern int ax25_hard_header(struct sk_buff *, struct net_device *, unsigned short, void *, void *, unsigned int); 366extern int ax25_hard_header(struct sk_buff *, struct net_device *,
367 unsigned short, const void *,
368 const void *, unsigned int);
367extern int ax25_rebuild_header(struct sk_buff *); 369extern int ax25_rebuild_header(struct sk_buff *);
370extern const struct header_ops ax25_header_ops;
368 371
369/* ax25_out.c */ 372/* ax25_out.c */
370extern ax25_cb *ax25_send_frame(struct sk_buff *, int, ax25_address *, ax25_address *, ax25_digi *, struct net_device *); 373extern ax25_cb *ax25_send_frame(struct sk_buff *, int, ax25_address *, ax25_address *, ax25_digi *, struct net_device *);
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 9e22526e80e7..ab61809a9616 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -97,10 +97,9 @@ extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp,
97/* Calculate maximal size of packet seen by hard_start_xmit 97/* Calculate maximal size of packet seen by hard_start_xmit
98 routine of this device. 98 routine of this device.
99 */ 99 */
100static inline unsigned psched_mtu(struct net_device *dev) 100static inline unsigned psched_mtu(const struct net_device *dev)
101{ 101{
102 unsigned mtu = dev->mtu; 102 return dev->mtu + dev->hard_header_len;
103 return dev->hard_header ? mtu + dev->hard_header_len : mtu;
104} 103}
105 104
106#endif 105#endif