diff options
-rw-r--r-- | include/net/sch_generic.h | 8 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 5 |
2 files changed, 10 insertions, 3 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index bf8f7264a778..5ba66b555578 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -250,6 +250,14 @@ static inline bool qdisc_tx_changing(struct net_device *dev) | |||
250 | return (txq->qdisc != txq->qdisc_sleeping); | 250 | return (txq->qdisc != txq->qdisc_sleeping); |
251 | } | 251 | } |
252 | 252 | ||
253 | /* Is the device using the noop qdisc? */ | ||
254 | static inline bool qdisc_tx_is_noop(const struct net_device *dev) | ||
255 | { | ||
256 | const struct netdev_queue *txq = &dev->tx_queue; | ||
257 | |||
258 | return (txq->qdisc == &noop_qdisc); | ||
259 | } | ||
260 | |||
253 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | 261 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, |
254 | struct sk_buff_head *list) | 262 | struct sk_buff_head *list) |
255 | { | 263 | { |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 5c84c798331d..30184e0dd74c 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -229,10 +229,9 @@ const struct in6_addr in6addr_linklocal_allnodes = IN6ADDR_LINKLOCAL_ALLNODES_IN | |||
229 | const struct in6_addr in6addr_linklocal_allrouters = IN6ADDR_LINKLOCAL_ALLROUTERS_INIT; | 229 | const struct in6_addr in6addr_linklocal_allrouters = IN6ADDR_LINKLOCAL_ALLROUTERS_INIT; |
230 | 230 | ||
231 | /* Check if a valid qdisc is available */ | 231 | /* Check if a valid qdisc is available */ |
232 | static inline int addrconf_qdisc_ok(struct net_device *dev) | 232 | static inline bool addrconf_qdisc_ok(const struct net_device *dev) |
233 | { | 233 | { |
234 | struct netdev_queue *txq = &dev->tx_queue; | 234 | return !qdisc_tx_is_noop(dev); |
235 | return (txq->qdisc != &noop_qdisc); | ||
236 | } | 235 | } |
237 | 236 | ||
238 | /* Check if a route is valid prefix route */ | 237 | /* Check if a route is valid prefix route */ |