1
Add pfifo_qdisc if kernel doesn't support explicit CONFIG_NET_SCHED_FIFO
2
diff -Nupr pre/net/mac80211/Makefile post/net/mac80211/Makefile
3
--- pre/net/mac80211/Makefile 2007-04-19 08:48:55.000000000 -0700
4
+++ post/net/mac80211/Makefile 2007-04-19 08:50:09.000000000 -0700
5
@@ -4,6 +4,7 @@ mac80211-objs-$(CONFIG_MAC80211_LEDS) +=
6
mac80211-objs-$(CONFIG_MAC80211_DEBUGFS) += debugfs.o debugfs_sta.o debugfs_netdev.o debugfs_key.o
13
diff -Nupr pre/net/mac80211/fifo_qdisc.c post/net/mac80211/fifo_qdisc.c
14
--- pre/net/mac80211/fifo_qdisc.c 1969-12-31 16:00:00.000000000 -0800
15
+++ post/net/mac80211/fifo_qdisc.c 2007-04-19 08:49:47.000000000 -0700
18
+ * Copyright 2005, Devicescape Software, Inc.
20
+ * This program is free software; you can redistribute it and/or modify
21
+ * it under the terms of the GNU General Public License version 2 as
22
+ * published by the Free Software Foundation.
24
+ * If building without CONFIG_NET_SCHED we need a simple
25
+ * fifo qdisc to install by default as the sub-qdisc.
26
+ * This is a simple replacement for sch_fifo.
29
+#include <linux/skbuff.h>
30
+#include <net/pkt_sched.h>
31
+#include <net/mac80211.h>
32
+#include "ieee80211_i.h"
35
+static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc* qd)
37
+ struct sk_buff_head *q = qdisc_priv(qd);
39
+ if (skb_queue_len(q) > qd->dev->tx_queue_len) {
42
+ return NET_XMIT_DROP;
45
+ skb_queue_tail(q, skb);
47
+ qd->bstats.bytes += skb->len;
48
+ qd->bstats.packets++;
50
+ return NET_XMIT_SUCCESS;
54
+static int pfifo_requeue(struct sk_buff *skb, struct Qdisc* qd)
56
+ struct sk_buff_head *q = qdisc_priv(qd);
58
+ skb_queue_head(q, skb);
60
+ qd->bstats.bytes += skb->len;
61
+ qd->bstats.packets++;
63
+ return NET_XMIT_SUCCESS;
67
+static struct sk_buff *pfifo_dequeue(struct Qdisc* qd)
69
+ struct sk_buff_head *q = qdisc_priv(qd);
71
+ return skb_dequeue(q);
75
+static int pfifo_init(struct Qdisc* qd, struct rtattr *opt)
77
+ struct sk_buff_head *q = qdisc_priv(qd);
79
+ skb_queue_head_init(q);
84
+static void pfifo_reset(struct Qdisc* qd)
86
+ struct sk_buff_head *q = qdisc_priv(qd);
93
+static int pfifo_dump(struct Qdisc *qd, struct sk_buff *skb)
99
+struct Qdisc_ops pfifo_qdisc_ops =
103
+ .id = "ieee80211_pfifo",
104
+ .priv_size = sizeof(struct sk_buff_head),
106
+ .enqueue = pfifo_enqueue,
107
+ .dequeue = pfifo_dequeue,
108
+ .requeue = pfifo_requeue,
111
+ .init = pfifo_init,
112
+ .reset = pfifo_reset,
116
+ .dump = pfifo_dump,