]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/sched/sch_sfq.c
ipv6: move DAD and addrconf_verify processing to workqueue
[karo-tx-linux.git] / net / sched / sch_sfq.c
index d3a1bc26dbfc536350ebaaecfdcb5426b7eacec5..87317ff0b4ec4699dae7898405666d2bde6c9897 100644 (file)
@@ -237,10 +237,12 @@ static inline void sfq_link(struct sfq_sched_data *q, sfq_index x)
 }
 
 #define sfq_unlink(q, x, n, p)                 \
-       n = q->slots[x].dep.next;               \
-       p = q->slots[x].dep.prev;               \
-       sfq_dep_head(q, p)->next = n;           \
-       sfq_dep_head(q, n)->prev = p
+       do {                                    \
+               n = q->slots[x].dep.next;       \
+               p = q->slots[x].dep.prev;       \
+               sfq_dep_head(q, p)->next = n;   \
+               sfq_dep_head(q, n)->prev = p;   \
+       } while (0)
 
 
 static inline void sfq_dec(struct sfq_sched_data *q, sfq_index x)
@@ -627,7 +629,7 @@ static void sfq_perturbation(unsigned long arg)
        spinlock_t *root_lock = qdisc_lock(qdisc_root_sleeping(sch));
 
        spin_lock(root_lock);
-       q->perturbation = net_random();
+       q->perturbation = prandom_u32();
        if (!q->filter_list && q->tail)
                sfq_rehash(sch);
        spin_unlock(root_lock);
@@ -696,7 +698,7 @@ static int sfq_change(struct Qdisc *sch, struct nlattr *opt)
        del_timer(&q->perturb_timer);
        if (q->perturb_period) {
                mod_timer(&q->perturb_timer, jiffies + q->perturb_period);
-               q->perturbation = net_random();
+               q->perturbation = prandom_u32();
        }
        sch_tree_unlock(sch);
        kfree(p);
@@ -757,7 +759,7 @@ static int sfq_init(struct Qdisc *sch, struct nlattr *opt)
        q->quantum = psched_mtu(qdisc_dev(sch));
        q->scaled_quantum = SFQ_ALLOT_SIZE(q->quantum);
        q->perturb_period = 0;
-       q->perturbation = net_random();
+       q->perturbation = prandom_u32();
 
        if (opt) {
                int err = sfq_change(sch, opt);