1 diff -Nur linux-2.4.30/include/linux/netdevice.h linux-2.4.30-wl-fix/include/linux/netdevice.h
2 --- linux-2.4.30/include/linux/netdevice.h 2004-11-17 12:54:22.000000000 +0100
3 +++ linux-2.4.30-wl-fix/include/linux/netdevice.h 2005-05-09 16:31:08.000000000 +0200
5 * See <net/iw_handler.h> for details. Jean II */
6 struct iw_handler_def * wireless_handlers;
8 - struct ethtool_ops *ethtool_ops;
12 * This marks the end of the "visible" part of the structure. All
16 struct Qdisc *qdisc_sleeping;
17 + struct Qdisc *qdisc_list;
18 struct Qdisc *qdisc_ingress;
19 - struct list_head qdisc_list;
20 unsigned long tx_queue_len; /* Max frames per queue allowed */
22 /* hard_start_xmit synchronizer */
24 /* this will get initialized at each interface type init routine */
25 struct divert_blk *divert;
26 #endif /* CONFIG_NET_DIVERT */
27 + struct ethtool_ops *ethtool_ops;
30 /* 2.6 compatibility */
31 diff -Nur linux-2.4.30/include/linux/skbuff.h linux-2.4.30-wl-fix/include/linux/skbuff.h
32 --- linux-2.4.30/include/linux/skbuff.h 2005-04-04 03:42:20.000000000 +0200
33 +++ linux-2.4.30-wl-fix/include/linux/skbuff.h 2005-05-08 00:50:55.000000000 +0200
35 struct sock *sk; /* Socket we are owned by */
36 struct timeval stamp; /* Time we arrived */
37 struct net_device *dev; /* Device we arrived on/are leaving by */
38 - struct net_device *real_dev; /* For support of point to point protocols
39 - (e.g. 802.3ad) over bonding, we must save the
40 - physical device that got the packet before
41 - replacing skb->dev with the virtual device. */
43 /* Transport layer header */
46 #ifdef CONFIG_NET_SCHED
47 __u32 tc_index; /* traffic control index */
49 + struct net_device *real_dev; /* For support of point to point protocols
50 + (e.g. 802.3ad) over bonding, we must save the
51 + physical device that got the packet before
52 + replacing skb->dev with the virtual device. */
56 diff -Nur linux-2.4.30/include/net/pkt_sched.h linux-2.4.30-wl-fix/include/net/pkt_sched.h
57 --- linux-2.4.30/include/net/pkt_sched.h 2004-11-17 12:54:22.000000000 +0100
58 +++ linux-2.4.30-wl-fix/include/net/pkt_sched.h 2005-05-08 01:05:48.000000000 +0200
60 int (*enqueue)(struct sk_buff *, struct Qdisc *);
61 struct sk_buff * (*dequeue)(struct Qdisc *);
62 int (*requeue)(struct sk_buff *, struct Qdisc *);
63 - unsigned int (*drop)(struct Qdisc *);
65 +#ifdef CONFIG_BCM4710
66 + int (*drop)(struct Qdisc *);
68 + unsigned int (*drop)(struct Qdisc *);
70 int (*init)(struct Qdisc *, struct rtattr *arg);
71 void (*reset)(struct Qdisc *);
72 void (*destroy)(struct Qdisc *);
74 #define TCQ_F_THROTTLED 2
75 #define TCQ_F_INGRESS 4
76 struct Qdisc_ops *ops;
77 +#ifdef CONFIG_BCM4710
82 +#ifndef CONFIG_BCM4710
86 struct sk_buff_head q;
87 struct net_device *dev;
88 - struct list_head list;
89 +#ifndef CONFIG_BCM4710
90 + struct list_head list;
93 struct tc_stats stats;
94 int (*reshape_fail)(struct sk_buff *skb, struct Qdisc *q);
95 diff -Nur linux-2.4.30/net/core/dev.c linux-2.4.30-wl-fix/net/core/dev.c
96 --- linux-2.4.30/net/core/dev.c 2005-04-04 03:42:20.000000000 +0200
97 +++ linux-2.4.30-wl-fix/net/core/dev.c 2005-05-08 00:51:08.000000000 +0200
102 +#ifndef CONFIG_BCM4710
104 dev_load(ifr.ifr_name);
106 @@ -2324,6 +2325,7 @@
114 diff -Nur linux-2.4.30/net/core/Makefile linux-2.4.30-wl-fix/net/core/Makefile
115 --- linux-2.4.30/net/core/Makefile 2004-11-17 12:54:22.000000000 +0100
116 +++ linux-2.4.30-wl-fix/net/core/Makefile 2005-05-08 00:51:02.000000000 +0200
121 +ifeq ($(CONFIG_BCM4710),y)
122 +export-objs := netfilter.o profile.o neighbour.o
124 export-objs := netfilter.o profile.o ethtool.o neighbour.o
127 obj-y := sock.o skbuff.o iovec.o datagram.o scm.o
131 obj-$(CONFIG_FILTER) += filter.o
133 +ifeq ($(CONFIG_BCM4710),y)
134 +obj-$(CONFIG_NET) += dev.o dev_mcast.o dst.o neighbour.o \
135 + rtnetlink.o utils.o
137 obj-$(CONFIG_NET) += dev.o ethtool.o dev_mcast.o dst.o neighbour.o \
141 obj-$(CONFIG_NETFILTER) += netfilter.o
142 obj-$(CONFIG_NET_DIVERT) += dv.o
143 diff -Nur linux-2.4.30/net/sched/sch_api.c linux-2.4.30-wl-fix/net/sched/sch_api.c
144 --- linux-2.4.30/net/sched/sch_api.c 2004-11-17 12:54:22.000000000 +0100
145 +++ linux-2.4.30-wl-fix/net/sched/sch_api.c 2005-05-08 00:51:14.000000000 +0200
146 @@ -194,11 +194,12 @@
150 - list_for_each_entry(q, &dev->qdisc_list, list) {
151 + for (q = dev->qdisc_list; q; q = q->next) {
152 if (q->handle == handle)
159 struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid)
161 unsigned long cl = cops->get(parent, classid);
163 err = cops->graft(parent, cl, new, old);
165 - new->parent = classid;
166 cops->put(parent, cl);
171 memset(sch, 0, size);
173 - INIT_LIST_HEAD(&sch->list);
174 skb_queue_head_init(&sch->q);
176 if (handle == TC_H_INGRESS)
179 if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) {
180 write_lock(&qdisc_tree_lock);
181 - list_add_tail(&sch->list, &dev->qdisc_list);
182 + sch->next = dev->qdisc_list;
183 + dev->qdisc_list = sch;
184 write_unlock(&qdisc_tree_lock);
185 #ifdef CONFIG_NET_ESTIMATOR
187 @@ -808,19 +807,16 @@
190 read_lock(&qdisc_tree_lock);
192 - list_for_each_entry(q, &dev->qdisc_list, list) {
193 - if (q_idx < s_q_idx) {
197 - if (tc_fill_qdisc(skb, q, q->parent, NETLINK_CB(cb->skb).pid,
198 - cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) {
199 - read_unlock(&qdisc_tree_lock);
204 + for (q = dev->qdisc_list, q_idx = 0; q;
205 + q = q->next, q_idx++) {
206 + if (q_idx < s_q_idx)
208 + if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid,
209 + cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) {
210 + read_unlock(&qdisc_tree_lock);
214 read_unlock(&qdisc_tree_lock);
217 @@ -1033,27 +1029,24 @@
220 read_lock(&qdisc_tree_lock);
221 - list_for_each_entry(q, &dev->qdisc_list, list) {
222 - if (t < s_t || !q->ops->cl_ops ||
223 - (tcm->tcm_parent &&
224 - TC_H_MAJ(tcm->tcm_parent) != q->handle)) {
229 - memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0]));
230 - arg.w.fn = qdisc_class_dump;
234 - arg.w.skip = cb->args[1];
236 - q->ops->cl_ops->walk(q, &arg.w);
237 - cb->args[1] = arg.w.count;
242 + for (q=dev->qdisc_list, t=0; q; q = q->next, t++) {
243 + if (t < s_t) continue;
244 + if (!q->ops->cl_ops) continue;
245 + if (tcm->tcm_parent && TC_H_MAJ(tcm->tcm_parent) != q->handle)
248 + memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0]));
249 + arg.w.fn = qdisc_class_dump;
253 + arg.w.skip = cb->args[1];
255 + q->ops->cl_ops->walk(q, &arg.w);
256 + cb->args[1] = arg.w.count;
260 read_unlock(&qdisc_tree_lock);
263 diff -Nur linux-2.4.30/net/sched/sch_generic.c linux-2.4.30-wl-fix/net/sched/sch_generic.c
264 --- linux-2.4.30/net/sched/sch_generic.c 2004-11-17 12:54:22.000000000 +0100
265 +++ linux-2.4.30-wl-fix/net/sched/sch_generic.c 2005-05-08 00:51:20.000000000 +0200
268 memset(sch, 0, size);
270 - INIT_LIST_HEAD(&sch->list);
271 skb_queue_head_init(&sch->q);
273 sch->enqueue = ops->enqueue;
274 @@ -422,11 +421,22 @@
275 void qdisc_destroy(struct Qdisc *qdisc)
277 struct Qdisc_ops *ops = qdisc->ops;
278 + struct net_device *dev;
280 if (qdisc->flags&TCQ_F_BUILTIN ||
281 !atomic_dec_and_test(&qdisc->refcnt))
283 - list_del(&qdisc->list);
287 + struct Qdisc *q, **qp;
288 + for (qp = &qdisc->dev->qdisc_list; (q=*qp) != NULL; qp = &q->next) {
295 #ifdef CONFIG_NET_ESTIMATOR
296 qdisc_kill_estimator(&qdisc->stats);
301 write_lock(&qdisc_tree_lock);
302 - list_add_tail(&qdisc->list, &dev->qdisc_list);
303 + qdisc->next = dev->qdisc_list;
304 + dev->qdisc_list = qdisc;
305 write_unlock(&qdisc_tree_lock);
308 qdisc = &noqueue_qdisc;
311 dev->qdisc = &noop_qdisc;
312 spin_unlock_bh(&dev->queue_lock);
313 dev->qdisc_sleeping = &noop_qdisc;
314 - INIT_LIST_HEAD(&dev->qdisc_list);
315 + dev->qdisc_list = NULL;
316 write_unlock(&qdisc_tree_lock);
318 dev_watchdog_init(dev);
320 qdisc_destroy(qdisc);
323 - BUG_TRAP(list_empty(&dev->qdisc_list));
324 + BUG_TRAP(dev->qdisc_list == NULL);
325 BUG_TRAP(!timer_pending(&dev->watchdog_timer));
326 spin_unlock_bh(&dev->queue_lock);
327 write_unlock(&qdisc_tree_lock);
328 diff -urN linux.old/net/core/dev.c linux.dev/net/core/dev.c
329 --- linux.old/net/core/dev.c 2005-05-28 17:42:07.000000000 +0200
330 +++ linux.dev/net/core/dev.c 2005-05-28 20:38:06.000000000 +0200
331 @@ -2223,6 +2223,7 @@
332 cmd == SIOCGMIIPHY ||
333 cmd == SIOCGMIIREG ||
334 cmd == SIOCSMIIREG ||
335 + cmd == SIOCETHTOOL ||
338 if (!netif_device_present(dev))
339 @@ -2405,6 +2406,7 @@
342 if (cmd == SIOCWANDEV ||
343 + (cmd == SIOCETHTOOL) ||
344 (cmd >= SIOCDEVPRIVATE &&
345 cmd <= SIOCDEVPRIVATE + 15)) {
346 dev_load(ifr.ifr_name);