From: Jiri Pirko Date: Wed, 1 Nov 2017 10:47:41 +0000 (+0100) Subject: net: sched: remove ndo_setup_tc check from tc_can_offload X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=70b5aee46782208c14d93b715e9f62f7fec844f1;p=linux.git net: sched: remove ndo_setup_tc check from tc_can_offload Since tc_can_offload is always called from block callback or egdev callback, no need to check if ndo_setup_tc exists. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 108dcdd96421e..d15c40c7bde73 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -611,11 +611,7 @@ struct tc_cls_u32_offload { static inline bool tc_can_offload(const struct net_device *dev) { - if (!(dev->features & NETIF_F_HW_TC)) - return false; - if (!dev->netdev_ops->ndo_setup_tc) - return false; - return true; + return dev->features & NETIF_F_HW_TC; } static inline bool tc_skip_hw(u32 flags)