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
15 struct Qdisc *qdisc_sleeping;
16 struct Qdisc *qdisc_ingress;
18 + * this is needed for the wlan driver binary blob from linksys
20 +#ifdef CONFIG_BCM4710
21 + struct Qdisc *qdisc_list;
23 struct list_head qdisc_list;
25 unsigned long tx_queue_len; /* Max frames per queue allowed */
27 /* hard_start_xmit synchronizer */
29 /* this will get initialized at each interface type init routine */
30 struct divert_blk *divert;
31 #endif /* CONFIG_NET_DIVERT */
32 + struct ethtool_ops *ethtool_ops;
35 /* 2.6 compatibility */
36 diff -Nur linux-2.4.30/include/linux/skbuff.h linux-2.4.30-wl-fix/include/linux/skbuff.h
37 --- linux-2.4.30/include/linux/skbuff.h 2005-04-04 03:42:20.000000000 +0200
38 +++ linux-2.4.30-wl-fix/include/linux/skbuff.h 2005-05-08 00:50:55.000000000 +0200
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 #ifdef CONFIG_NET_SCHED
52 __u32 tc_index; /* traffic control index */
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 -Nur linux-2.4.30/include/net/pkt_sched.h linux-2.4.30-wl-fix/include/net/pkt_sched.h
62 --- linux-2.4.30/include/net/pkt_sched.h 2004-11-17 12:54:22.000000000 +0100
63 +++ linux-2.4.30-wl-fix/include/net/pkt_sched.h 2005-05-08 01:05:48.000000000 +0200
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 -Nur linux-2.4.30/net/core/dev.c linux-2.4.30-wl-fix/net/core/dev.c
101 --- linux-2.4.30/net/core/dev.c 2005-04-04 03:42:20.000000000 +0200
102 +++ linux-2.4.30-wl-fix/net/core/dev.c 2005-05-08 00:51:08.000000000 +0200
103 @@ -2311,6 +2311,7 @@
107 +#ifndef CONFIG_BCM4710
109 dev_load(ifr.ifr_name);
111 @@ -2324,6 +2325,7 @@
119 diff -Nur linux-2.4.30/net/core/Makefile linux-2.4.30-wl-fix/net/core/Makefile
120 --- linux-2.4.30/net/core/Makefile 2004-11-17 12:54:22.000000000 +0100
121 +++ linux-2.4.30-wl-fix/net/core/Makefile 2005-05-08 00:51:02.000000000 +0200
126 +ifeq ($(CONFIG_BCM4710),y)
127 +export-objs := netfilter.o profile.o neighbour.o
129 export-objs := netfilter.o profile.o ethtool.o neighbour.o
132 obj-y := sock.o skbuff.o iovec.o datagram.o scm.o
136 obj-$(CONFIG_FILTER) += filter.o
138 +ifeq ($(CONFIG_BCM4710),y)
139 +obj-$(CONFIG_NET) += dev.o dev_mcast.o dst.o neighbour.o \
140 + rtnetlink.o utils.o
142 obj-$(CONFIG_NET) += dev.o ethtool.o dev_mcast.o dst.o neighbour.o \
146 obj-$(CONFIG_NETFILTER) += netfilter.o
147 obj-$(CONFIG_NET_DIVERT) += dv.o
148 diff -Nur linux-2.4.30/net/sched/sch_api.c linux-2.4.30-wl-fix/net/sched/sch_api.c
149 --- linux-2.4.30/net/sched/sch_api.c 2004-11-17 12:54:22.000000000 +0100
150 +++ linux-2.4.30-wl-fix/net/sched/sch_api.c 2005-05-08 00:51:14.000000000 +0200
151 @@ -194,11 +194,12 @@
155 - list_for_each_entry(q, &dev->qdisc_list, list) {
156 + for (q = dev->qdisc_list; q; q = q->next) {
157 if (q->handle == handle)
164 struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid)
166 unsigned long cl = cops->get(parent, classid);
168 err = cops->graft(parent, cl, new, old);
170 - new->parent = classid;
171 cops->put(parent, cl);
176 memset(sch, 0, size);
178 - INIT_LIST_HEAD(&sch->list);
179 skb_queue_head_init(&sch->q);
181 if (handle == TC_H_INGRESS)
184 if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) {
185 write_lock(&qdisc_tree_lock);
186 - list_add_tail(&sch->list, &dev->qdisc_list);
187 + sch->next = dev->qdisc_list;
188 + dev->qdisc_list = sch;
189 write_unlock(&qdisc_tree_lock);
190 #ifdef CONFIG_NET_ESTIMATOR
192 @@ -808,19 +807,16 @@
195 read_lock(&qdisc_tree_lock);
197 - list_for_each_entry(q, &dev->qdisc_list, list) {
198 - if (q_idx < s_q_idx) {
202 - if (tc_fill_qdisc(skb, q, q->parent, NETLINK_CB(cb->skb).pid,
203 - cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) {
204 - read_unlock(&qdisc_tree_lock);
209 + for (q = dev->qdisc_list, q_idx = 0; q;
210 + q = q->next, q_idx++) {
211 + if (q_idx < s_q_idx)
213 + if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid,
214 + cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) {
215 + read_unlock(&qdisc_tree_lock);
219 read_unlock(&qdisc_tree_lock);
222 @@ -1033,27 +1029,24 @@
225 read_lock(&qdisc_tree_lock);
226 - list_for_each_entry(q, &dev->qdisc_list, list) {
227 - if (t < s_t || !q->ops->cl_ops ||
228 - (tcm->tcm_parent &&
229 - TC_H_MAJ(tcm->tcm_parent) != q->handle)) {
234 - memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0]));
235 - arg.w.fn = qdisc_class_dump;
239 - arg.w.skip = cb->args[1];
241 - q->ops->cl_ops->walk(q, &arg.w);
242 - cb->args[1] = arg.w.count;
247 + for (q=dev->qdisc_list, t=0; q; q = q->next, t++) {
248 + if (t < s_t) continue;
249 + if (!q->ops->cl_ops) continue;
250 + if (tcm->tcm_parent && TC_H_MAJ(tcm->tcm_parent) != q->handle)
253 + memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0]));
254 + arg.w.fn = qdisc_class_dump;
258 + arg.w.skip = cb->args[1];
260 + q->ops->cl_ops->walk(q, &arg.w);
261 + cb->args[1] = arg.w.count;
265 read_unlock(&qdisc_tree_lock);
268 diff -Nur linux-2.4.30/net/sched/sch_generic.c linux-2.4.30-wl-fix/net/sched/sch_generic.c
269 --- linux-2.4.30/net/sched/sch_generic.c 2004-11-17 12:54:22.000000000 +0100
270 +++ linux-2.4.30-wl-fix/net/sched/sch_generic.c 2005-05-08 00:51:20.000000000 +0200
273 memset(sch, 0, size);
275 - INIT_LIST_HEAD(&sch->list);
276 skb_queue_head_init(&sch->q);
278 sch->enqueue = ops->enqueue;
279 @@ -422,11 +421,22 @@
280 void qdisc_destroy(struct Qdisc *qdisc)
282 struct Qdisc_ops *ops = qdisc->ops;
283 + struct net_device *dev;
285 if (qdisc->flags&TCQ_F_BUILTIN ||
286 !atomic_dec_and_test(&qdisc->refcnt))
288 - list_del(&qdisc->list);
292 + struct Qdisc *q, **qp;
293 + for (qp = &qdisc->dev->qdisc_list; (q=*qp) != NULL; qp = &q->next) {
300 #ifdef CONFIG_NET_ESTIMATOR
301 qdisc_kill_estimator(&qdisc->stats);
306 write_lock(&qdisc_tree_lock);
307 - list_add_tail(&qdisc->list, &dev->qdisc_list);
308 + qdisc->next = dev->qdisc_list;
309 + dev->qdisc_list = qdisc;
310 write_unlock(&qdisc_tree_lock);
313 qdisc = &noqueue_qdisc;
316 dev->qdisc = &noop_qdisc;
317 spin_unlock_bh(&dev->queue_lock);
318 dev->qdisc_sleeping = &noop_qdisc;
319 - INIT_LIST_HEAD(&dev->qdisc_list);
320 + dev->qdisc_list = NULL;
321 write_unlock(&qdisc_tree_lock);
323 dev_watchdog_init(dev);
325 qdisc_destroy(qdisc);
328 - BUG_TRAP(list_empty(&dev->qdisc_list));
329 + BUG_TRAP(dev->qdisc_list == NULL);
330 BUG_TRAP(!timer_pending(&dev->watchdog_timer));
331 spin_unlock_bh(&dev->queue_lock);
332 write_unlock(&qdisc_tree_lock);
333 diff -urN linux.old/net/core/dev.c linux.dev/net/core/dev.c
334 --- linux.old/net/core/dev.c 2005-05-28 17:42:07.000000000 +0200
335 +++ linux.dev/net/core/dev.c 2005-05-28 20:38:06.000000000 +0200
336 @@ -2223,6 +2223,7 @@
337 cmd == SIOCGMIIPHY ||
338 cmd == SIOCGMIIREG ||
339 cmd == SIOCSMIIREG ||
340 + cmd == SIOCETHTOOL ||
343 if (!netif_device_present(dev))
344 @@ -2405,6 +2406,7 @@
347 if (cmd == SIOCWANDEV ||
348 + (cmd == SIOCETHTOOL) ||
349 (cmd >= SIOCDEVPRIVATE &&
350 cmd <= SIOCDEVPRIVATE + 15)) {
351 dev_load(ifr.ifr_name);