36f16d2bfd2306ddaabee6ae370fcbdb34ae4231
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-3.3 / 044-net-codel-fix-build-errors.patch
1 From 669d67bf777def468970f2dcba1537edf3b2d329 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <levinsasha928@gmail.com>
3 Date: Mon, 14 May 2012 11:57:06 +0000
4 Subject: [PATCH 45/50] net: codel: fix build errors
5
6 Fix the following build error:
7
8 net/sched/sch_fq_codel.c: In function 'fq_codel_dump_stats':
9 net/sched/sch_fq_codel.c:464:3: error: unknown field 'qdisc_stats' specified in initializer
10 net/sched/sch_fq_codel.c:464:3: warning: missing braces around initializer
11 net/sched/sch_fq_codel.c:464:3: warning: (near initialization for 'st.<anonymous>')
12 net/sched/sch_fq_codel.c:465:3: error: unknown field 'qdisc_stats' specified in initializer
13 net/sched/sch_fq_codel.c:465:3: warning: excess elements in struct initializer
14 net/sched/sch_fq_codel.c:465:3: warning: (near initialization for 'st')
15 net/sched/sch_fq_codel.c:466:3: error: unknown field 'qdisc_stats' specified in initializer
16 net/sched/sch_fq_codel.c:466:3: warning: excess elements in struct initializer
17 net/sched/sch_fq_codel.c:466:3: warning: (near initialization for 'st')
18 net/sched/sch_fq_codel.c:467:3: error: unknown field 'qdisc_stats' specified in initializer
19 net/sched/sch_fq_codel.c:467:3: warning: excess elements in struct initializer
20 net/sched/sch_fq_codel.c:467:3: warning: (near initialization for 'st')
21 make[1]: *** [net/sched/sch_fq_codel.o] Error 1
22
23 Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
24 Signed-off-by: David S. Miller <davem@davemloft.net>
25 ---
26 net/sched/sch_fq_codel.c | 9 +++++----
27 1 file changed, 5 insertions(+), 4 deletions(-)
28
29 --- a/net/sched/sch_fq_codel.c
30 +++ b/net/sched/sch_fq_codel.c
31 @@ -461,13 +461,14 @@ static int fq_codel_dump_stats(struct Qd
32 struct fq_codel_sched_data *q = qdisc_priv(sch);
33 struct tc_fq_codel_xstats st = {
34 .type = TCA_FQ_CODEL_XSTATS_QDISC,
35 - .qdisc_stats.maxpacket = q->cstats.maxpacket,
36 - .qdisc_stats.drop_overlimit = q->drop_overlimit,
37 - .qdisc_stats.ecn_mark = q->cstats.ecn_mark,
38 - .qdisc_stats.new_flow_count = q->new_flow_count,
39 };
40 struct list_head *pos;
41
42 + st.qdisc_stats.maxpacket = q->cstats.maxpacket;
43 + st.qdisc_stats.drop_overlimit = q->drop_overlimit;
44 + st.qdisc_stats.ecn_mark = q->cstats.ecn_mark;
45 + st.qdisc_stats.new_flow_count = q->new_flow_count;
46 +
47 list_for_each(pos, &q->new_flows)
48 st.qdisc_stats.new_flows_len++;
49