diff options
author | Kevin Hilman <khilman@linaro.org> | 2013-12-20 08:59:04 -0800 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2013-12-20 08:59:30 -0800 |
commit | 490b929d42d2a321887f9538a83fc9f215675f15 (patch) | |
tree | 04fe7161f92c568839605f92c8f1c8730216f739 /net/sched/sch_netem.c | |
parent | 23621799f24c3c4e8e8dcdf5fdeb3ebd2be148f9 (diff) | |
parent | ef43eff3447f30b4a3cfc61813902c2e57c20245 (diff) |
Merge branch 'efm32/soc' into next/soc
From Uwe Kleine-König:
* efm32/soc: (1003 commits)
ARM: device trees for Energy Micro's EFM32 Cortex-M3 SoCs
ARM: new platform for Energy Micro's EFM32 Cortex-M3 SoCs
+Linux 3.13-rc4
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Diffstat (limited to 'net/sched/sch_netem.c')
-rw-r--r-- | net/sched/sch_netem.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 75c94e59a3bd..bccd52b36e97 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -215,10 +215,10 @@ static bool loss_4state(struct netem_sched_data *q) if (rnd < clg->a4) { clg->state = 4; return true; - } else if (clg->a4 < rnd && rnd < clg->a1) { + } else if (clg->a4 < rnd && rnd < clg->a1 + clg->a4) { clg->state = 3; return true; - } else if (clg->a1 < rnd) + } else if (clg->a1 + clg->a4 < rnd) clg->state = 1; break; @@ -268,10 +268,11 @@ static bool loss_gilb_ell(struct netem_sched_data *q) clg->state = 2; if (net_random() < clg->a4) return true; + break; case 2: if (net_random() < clg->a2) clg->state = 1; - if (clg->a3 > net_random()) + if (net_random() > clg->a3) return true; } |