aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/pkt_sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/pkt_sched.h')
-rw-r--r--include/net/pkt_sched.h5
1 files changed, 2 insertions, 3 deletions
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