projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e035b8a
)
sch_netem: replace magic numbers with enumerate in get_loss_clg
author
Yang Yingliang
<yangyingliang@huawei.com>
Mon, 17 Feb 2014 08:48:21 +0000
(16:48 +0800)
committer
David S. Miller
<davem@davemloft.net>
Mon, 17 Feb 2014 21:55:54 +0000
(16:55 -0500)
Replace two magic numbers which intialize clgstate::state.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_netem.c
patch
|
blob
|
blame
|
history
diff --git
a/net/sched/sch_netem.c
b/net/sched/sch_netem.c
index 4fced67e94c8ee9cd703a02e125e551bc0c38fd8..f1669a00f5710c297310f4a1da4a1b4e72cd3cab 100644
(file)
--- a/
net/sched/sch_netem.c
+++ b/
net/sched/sch_netem.c
@@
-752,7
+752,7
@@
static int get_loss_clg(struct netem_sched_data *q, const struct nlattr *attr)
q->loss_model = CLG_4_STATES;
- q->clg.state =
1
;
+ q->clg.state =
TX_IN_GAP_PERIOD
;
q->clg.a1 = gi->p13;
q->clg.a2 = gi->p31;
q->clg.a3 = gi->p32;
@@
-770,7
+770,7
@@
static int get_loss_clg(struct netem_sched_data *q, const struct nlattr *attr)
}
q->loss_model = CLG_GILB_ELL;
- q->clg.state =
1
;
+ q->clg.state =
GOOD_STATE
;
q->clg.a1 = ge->p;
q->clg.a2 = ge->r;
q->clg.a3 = ge->h;