diff options
author | Yang Yingliang | 2014-02-17 09:48:21 +0100 |
---|---|---|
committer | David S. Miller | 2014-02-17 22:55:54 +0100 |
commit | 3fbac2a87e73e1dfdfa83e18e9601628eec0d676 (patch) | |
tree | e9c3445eb54c94cf4cb846fe21ff18b6c0eb66b4 /net | |
parent | Merge branch 'ieee802154' (diff) | |
download | kernel-qcow2-linux-3fbac2a87e73e1dfdfa83e18e9601628eec0d676.tar.gz kernel-qcow2-linux-3fbac2a87e73e1dfdfa83e18e9601628eec0d676.tar.xz kernel-qcow2-linux-3fbac2a87e73e1dfdfa83e18e9601628eec0d676.zip |
sch_netem: replace magic numbers with enumerate in get_loss_clg
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/sch_netem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 4fced67e94c8..f1669a00f571 100644 --- 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; |