1 diff -urN linux.old/include/linux/netdevice.h linux.dev/include/linux/netdevice.h
2 --- linux.old/include/linux/netdevice.h 2006-03-19 06:32:22.000000000 +0100
3 +++ linux.dev/include/linux/netdevice.h 2006-03-19 06:33:21.000000000 +0100
5 /* List of functions to handle Wireless Extensions (instead of ioctl).
6 * See <net/iw_handler.h> for details. Jean II */
7 const struct iw_handler_def * wireless_handlers;
8 - /* Instance data managed by the core of Wireless Extensions. */
9 - struct iw_public_data * wireless_data;
11 - struct ethtool_ops *ethtool_ops;
14 * This marks the end of the "visible" part of the structure. All
18 struct Qdisc *qdisc_sleeping;
19 + struct Qdisc *qdisc_list;
20 struct Qdisc *qdisc_ingress;
21 - struct list_head qdisc_list;
22 unsigned long tx_queue_len; /* Max frames per queue allowed */
24 /* hard_start_xmit synchronizer */
26 /* this will get initialized at each interface type init routine */
27 struct divert_blk *divert;
28 #endif /* CONFIG_NET_DIVERT */
29 + struct ethtool_ops *ethtool_ops;
31 + /* Instance data managed by the core of Wireless Extensions. */
32 + struct iw_public_data * wireless_data;
35 /* 2.6 compatibility */
36 diff -urN linux.old/include/linux/skbuff.h linux.dev/include/linux/skbuff.h
37 --- linux.old/include/linux/skbuff.h 2006-03-19 06:32:22.000000000 +0100
38 +++ linux.dev/include/linux/skbuff.h 2006-03-19 06:29:41.000000000 +0100
40 struct sock *sk; /* Socket we are owned by */
41 struct timeval stamp; /* Time we arrived */
42 struct net_device *dev; /* Device we arrived on/are leaving by */
43 - struct net_device *real_dev; /* For support of point to point protocols
44 - (e.g. 802.3ad) over bonding, we must save the
45 - physical device that got the packet before
46 - replacing skb->dev with the virtual device. */
48 /* Transport layer header */
51 #if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
52 struct nf_info *nf_info;
54 + struct net_device *real_dev; /* For support of point to point protocols
55 + (e.g. 802.3ad) over bonding, we must save the
56 + physical device that got the packet before
57 + replacing skb->dev with the virtual device. */
61 diff -urN linux.old/include/net/pkt_sched.h linux.dev/include/net/pkt_sched.h
62 --- linux.old/include/net/pkt_sched.h 2006-03-19 06:32:22.000000000 +0100
63 +++ linux.dev/include/net/pkt_sched.h 2006-03-19 06:29:41.000000000 +0100
65 int (*enqueue)(struct sk_buff *, struct Qdisc *);
66 struct sk_buff * (*dequeue)(struct Qdisc *);
67 int (*requeue)(struct sk_buff *, struct Qdisc *);
68 - unsigned int (*drop)(struct Qdisc *);
70 +#ifdef CONFIG_BCM4710
71 + int (*drop)(struct Qdisc *);
73 + unsigned int (*drop)(struct Qdisc *);
75 int (*init)(struct Qdisc *, struct rtattr *arg);
76 void (*reset)(struct Qdisc *);
77 void (*destroy)(struct Qdisc *);
79 #define TCQ_F_THROTTLED 2
80 #define TCQ_F_INGRESS 4
81 struct Qdisc_ops *ops;
82 +#ifdef CONFIG_BCM4710
87 +#ifndef CONFIG_BCM4710
91 struct sk_buff_head q;
92 struct net_device *dev;
93 - struct list_head list;
94 +#ifndef CONFIG_BCM4710
95 + struct list_head list;
98 struct tc_stats stats;
99 int (*reshape_fail)(struct sk_buff *skb, struct Qdisc *q);
100 diff -urN linux.old/net/core/Makefile linux.dev/net/core/Makefile
101 --- linux.old/net/core/Makefile 2006-03-19 06:32:22.000000000 +0100
102 +++ linux.dev/net/core/Makefile 2006-03-19 06:29:41.000000000 +0100
107 +ifeq ($(CONFIG_BCM4710),y)
108 +export-objs := netfilter.o profile.o neighbour.o
110 export-objs := netfilter.o profile.o ethtool.o neighbour.o
113 obj-y := sock.o skbuff.o iovec.o datagram.o scm.o
117 obj-$(CONFIG_FILTER) += filter.o
119 +ifeq ($(CONFIG_BCM4710),y)
120 +obj-$(CONFIG_NET) += dev.o dev_mcast.o dst.o neighbour.o \
121 + rtnetlink.o utils.o
123 obj-$(CONFIG_NET) += dev.o ethtool.o dev_mcast.o dst.o neighbour.o \
127 obj-$(CONFIG_NETFILTER) += netfilter.o
128 obj-$(CONFIG_NET_DIVERT) += dv.o
129 diff -urN linux.old/net/core/dev.c linux.dev/net/core/dev.c
130 --- linux.old/net/core/dev.c 2006-03-19 06:32:22.000000000 +0100
131 +++ linux.dev/net/core/dev.c 2006-03-19 06:29:41.000000000 +0100
132 @@ -2232,6 +2232,7 @@
133 cmd == SIOCGMIIPHY ||
134 cmd == SIOCGMIIREG ||
135 cmd == SIOCSMIIREG ||
136 + cmd == SIOCETHTOOL ||
139 if (!netif_device_present(dev))
140 @@ -2324,6 +2325,7 @@
144 +#ifndef CONFIG_BCM4710
146 dev_load(ifr.ifr_name);
148 @@ -2337,6 +2339,7 @@
156 @@ -2412,6 +2415,7 @@
159 if (cmd == SIOCWANDEV ||
160 + (cmd == SIOCETHTOOL) ||
161 (cmd >= SIOCDEVPRIVATE &&
162 cmd <= SIOCDEVPRIVATE + 15)) {
163 dev_load(ifr.ifr_name);
164 diff -urN linux.old/net/sched/sch_api.c linux.dev/net/sched/sch_api.c
165 --- linux.old/net/sched/sch_api.c 2006-03-19 06:32:22.000000000 +0100
166 +++ linux.dev/net/sched/sch_api.c 2006-03-19 06:29:41.000000000 +0100
167 @@ -194,11 +194,12 @@
171 - list_for_each_entry(q, &dev->qdisc_list, list) {
172 + for (q = dev->qdisc_list; q; q = q->next) {
173 if (q->handle == handle)
180 struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid)
182 unsigned long cl = cops->get(parent, classid);
184 err = cops->graft(parent, cl, new, old);
186 - new->parent = classid;
187 cops->put(parent, cl);
192 memset(sch, 0, size);
194 - INIT_LIST_HEAD(&sch->list);
195 skb_queue_head_init(&sch->q);
197 if (handle == TC_H_INGRESS)
200 if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) {
201 write_lock(&qdisc_tree_lock);
202 - list_add_tail(&sch->list, &dev->qdisc_list);
203 + sch->next = dev->qdisc_list;
204 + dev->qdisc_list = sch;
205 write_unlock(&qdisc_tree_lock);
206 #ifdef CONFIG_NET_ESTIMATOR
208 @@ -808,19 +807,16 @@
211 read_lock(&qdisc_tree_lock);
213 - list_for_each_entry(q, &dev->qdisc_list, list) {
214 - if (q_idx < s_q_idx) {
218 - if (tc_fill_qdisc(skb, q, q->parent, NETLINK_CB(cb->skb).pid,
219 - cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) {
220 - read_unlock(&qdisc_tree_lock);
225 + for (q = dev->qdisc_list, q_idx = 0; q;
226 + q = q->next, q_idx++) {
227 + if (q_idx < s_q_idx)
229 + if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid,
230 + cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) {
231 + read_unlock(&qdisc_tree_lock);
235 read_unlock(&qdisc_tree_lock);
238 @@ -1033,27 +1029,24 @@
241 read_lock(&qdisc_tree_lock);
242 - list_for_each_entry(q, &dev->qdisc_list, list) {
243 - if (t < s_t || !q->ops->cl_ops ||
244 - (tcm->tcm_parent &&
245 - TC_H_MAJ(tcm->tcm_parent) != q->handle)) {
250 - memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0]));
251 - arg.w.fn = qdisc_class_dump;
255 - arg.w.skip = cb->args[1];
257 - q->ops->cl_ops->walk(q, &arg.w);
258 - cb->args[1] = arg.w.count;
263 + for (q=dev->qdisc_list, t=0; q; q = q->next, t++) {
264 + if (t < s_t) continue;
265 + if (!q->ops->cl_ops) continue;
266 + if (tcm->tcm_parent && TC_H_MAJ(tcm->tcm_parent) != q->handle)
269 + memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0]));
270 + arg.w.fn = qdisc_class_dump;
274 + arg.w.skip = cb->args[1];
276 + q->ops->cl_ops->walk(q, &arg.w);
277 + cb->args[1] = arg.w.count;
281 read_unlock(&qdisc_tree_lock);
284 diff -urN linux.old/net/sched/sch_generic.c linux.dev/net/sched/sch_generic.c
285 --- linux.old/net/sched/sch_generic.c 2006-03-19 06:32:22.000000000 +0100
286 +++ linux.dev/net/sched/sch_generic.c 2006-03-19 06:29:41.000000000 +0100
289 memset(sch, 0, size);
291 - INIT_LIST_HEAD(&sch->list);
292 skb_queue_head_init(&sch->q);
294 sch->enqueue = ops->enqueue;
295 @@ -429,11 +428,22 @@
296 void qdisc_destroy(struct Qdisc *qdisc)
298 struct Qdisc_ops *ops = qdisc->ops;
299 + struct net_device *dev;
301 if (qdisc->flags&TCQ_F_BUILTIN ||
302 !atomic_dec_and_test(&qdisc->refcnt))
304 - list_del(&qdisc->list);
308 + struct Qdisc *q, **qp;
309 + for (qp = &qdisc->dev->qdisc_list; (q=*qp) != NULL; qp = &q->next) {
316 #ifdef CONFIG_NET_ESTIMATOR
317 qdisc_kill_estimator(&qdisc->stats);
322 write_lock(&qdisc_tree_lock);
323 - list_add_tail(&qdisc->list, &dev->qdisc_list);
324 + qdisc->next = dev->qdisc_list;
325 + dev->qdisc_list = qdisc;
326 write_unlock(&qdisc_tree_lock);
329 qdisc = &noqueue_qdisc;
332 dev->qdisc = &noop_qdisc;
333 spin_unlock_bh(&dev->queue_lock);
334 dev->qdisc_sleeping = &noop_qdisc;
335 - INIT_LIST_HEAD(&dev->qdisc_list);
336 + dev->qdisc_list = NULL;
337 write_unlock(&qdisc_tree_lock);
339 dev_watchdog_init(dev);
341 qdisc_destroy(qdisc);
344 - BUG_TRAP(list_empty(&dev->qdisc_list));
345 + BUG_TRAP(dev->qdisc_list == NULL);
346 BUG_TRAP(!timer_pending(&dev->watchdog_timer));
347 spin_unlock_bh(&dev->queue_lock);
348 write_unlock(&qdisc_tree_lock);