aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/net/sch_generic.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index a9505b6a18e3..b931f021d7ab 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -25,6 +25,7 @@ struct qdisc_rate_table {
25enum qdisc_state_t { 25enum qdisc_state_t {
26 __QDISC_STATE_SCHED, 26 __QDISC_STATE_SCHED,
27 __QDISC_STATE_DEACTIVATED, 27 __QDISC_STATE_DEACTIVATED,
28 __QDISC_STATE_THROTTLED,
28}; 29};
29 30
30/* 31/*
@@ -32,7 +33,6 @@ enum qdisc_state_t {
32 */ 33 */
33enum qdisc___state_t { 34enum qdisc___state_t {
34 __QDISC___STATE_RUNNING = 1, 35 __QDISC___STATE_RUNNING = 1,
35 __QDISC___STATE_THROTTLED = 2,
36}; 36};
37 37
38struct qdisc_size_table { 38struct qdisc_size_table {
@@ -106,17 +106,17 @@ static inline void qdisc_run_end(struct Qdisc *qdisc)
106 106
107static inline bool qdisc_is_throttled(const struct Qdisc *qdisc) 107static inline bool qdisc_is_throttled(const struct Qdisc *qdisc)
108{ 108{
109 return (qdisc->__state & __QDISC___STATE_THROTTLED) ? true : false; 109 return test_bit(__QDISC_STATE_THROTTLED, &qdisc->state) ? true : false;
110} 110}
111 111
112static inline void qdisc_throttled(struct Qdisc *qdisc) 112static inline void qdisc_throttled(struct Qdisc *qdisc)
113{ 113{
114 qdisc->__state |= __QDISC___STATE_THROTTLED; 114 set_bit(__QDISC_STATE_THROTTLED, &qdisc->state);
115} 115}
116 116
117static inline void qdisc_unthrottled(struct Qdisc *qdisc) 117static inline void qdisc_unthrottled(struct Qdisc *qdisc)
118{ 118{
119 qdisc->__state &= ~__QDISC___STATE_THROTTLED; 119 clear_bit(__QDISC_STATE_THROTTLED, &qdisc->state);
120} 120}
121 121
122struct Qdisc_class_ops { 122struct Qdisc_class_ops {