All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Kimdon <david.kimdon@devicescape.com>
To: netdev@vger.kernel.org
Cc: "John W. Linville" <linville@tuxdriver.com>,
	Jiri Benc <jbenc@suse.cz>,
	David Kimdon <david.kimdon@devicescape.com>
Subject: [patch] d80211: use pfifo_qdisc_ops rather than d80211-specific qdisc
Date: Wed, 25 Oct 2006 15:04:06 -0700	[thread overview]
Message-ID: <20061025220406.GA5413@devicescape.com> (raw)

[-- Attachment #1: remove_d80211_fifo_qdisc.patch --]
[-- Type: text/plain, Size: 4040 bytes --]

wme.c needs a generic fifo qdisc for each hardware queue.  Switch 
wme.c to use the generic fifo qdisc in net/sched/sch_fifo.c.  This allows
removal of net/d80211/fifo_qdisc.c which isn't particularily tied to
IEEE 802.11 in any way.

Signed-off-by: David Kimdon <david.kimdon@devicescape.com>

Index: wireless-dev/net/d80211/Makefile
===================================================================
--- wireless-dev.orig/net/d80211/Makefile
+++ wireless-dev/net/d80211/Makefile
@@ -21,6 +21,3 @@ obj-$(CONFIG_D80211) += 80211.o rc80211_
 	wme.o \
 	$(80211-objs-y)
 
-ifeq ($(CONFIG_NET_SCHED),)
-  80211-objs += fifo_qdisc.o
-endif
Index: wireless-dev/net/d80211/wme.c
===================================================================
--- wireless-dev.orig/net/d80211/wme.c
+++ wireless-dev/net/d80211/wme.c
@@ -18,8 +18,6 @@
 #include "ieee80211_i.h"
 #include "wme.h"
 
-#define CHILD_QDISC_OPS pfifo_qdisc_ops
-
 static inline int WLAN_FC_IS_QOS_DATA(u16 fc)
 {
 	return (fc & 0x8C) == 0x88;
@@ -433,7 +431,7 @@ static int wme_qdiscop_init(struct Qdisc
 	/* create child queues */
 	for (i = 0; i < queues; i++) {
 		skb_queue_head_init(&q->requeued[i]);
-		q->queues[i] = qdisc_create_dflt(qd->dev, &CHILD_QDISC_OPS);
+		q->queues[i] = qdisc_create_dflt(qd->dev, &pfifo_qdisc_ops);
 		if (q->queues[i] == 0) {
 			q->queues[i] = &noop_qdisc;
 			printk(KERN_ERR "%s child qdisc %i creation failed", dev->name, i);
Index: wireless-dev/net/d80211/fifo_qdisc.c
===================================================================
--- wireless-dev.orig/net/d80211/fifo_qdisc.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright 2005, Devicescape Software, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * If building without CONFIG_NET_SCHED we need a simple
- * fifo qdisc to install by default as the sub-qdisc.
- * This is a simple replacement for sch_fifo.
- */
-
-#include <linux/skbuff.h>
-#include <net/pkt_sched.h>
-#include <net/d80211.h>
-#include "ieee80211_i.h"
-#include "wme.h"
-
-static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc* qd)
-{
-	struct sk_buff_head *q = qdisc_priv(qd);
-
-	if (skb_queue_len(q) > qd->dev->tx_queue_len) {
-		qd->qstats.drops++;
-		kfree_skb(skb);
-		return NET_XMIT_DROP;
-	}
-
-	skb_queue_tail(q, skb);
-	qd->q.qlen++;
-	qd->bstats.bytes += skb->len;
-	qd->bstats.packets++;
-
-	return NET_XMIT_SUCCESS;
-}
-
-
-static int pfifo_requeue(struct sk_buff *skb, struct Qdisc* qd)
-{
-	struct sk_buff_head *q = qdisc_priv(qd);
-
-	skb_queue_head(q, skb);
-	qd->q.qlen++;
-	qd->bstats.bytes += skb->len;
-	qd->bstats.packets++;
-
-	return NET_XMIT_SUCCESS;
-}
-
-
-static struct sk_buff *pfifo_dequeue(struct Qdisc* qd)
-{
-	struct sk_buff_head *q = qdisc_priv(qd);
-
-	return skb_dequeue(q);
-}
-
-
-static int pfifo_init(struct Qdisc* qd, struct rtattr *opt)
-{
-	struct sk_buff_head *q = qdisc_priv(qd);
-
-	skb_queue_head_init(q);
-	return 0;
-}
-
-
-static void pfifo_reset(struct Qdisc* qd)
-{
-	struct sk_buff_head *q = qdisc_priv(qd);
-
-	skb_queue_purge(q);
-	qd->q.qlen = 0;
-}
-
-
-static int pfifo_dump(struct Qdisc *qd, struct sk_buff *skb)
-{
-	return skb->len;
-}
-
-
-struct Qdisc_ops pfifo_qdisc_ops =
-{
-	.next = NULL,
-	.cl_ops = NULL,
-	.id = "ieee80211_pfifo",
-	.priv_size = sizeof(struct sk_buff_head),
-
-	.enqueue = pfifo_enqueue,
-	.dequeue = pfifo_dequeue,
-	.requeue = pfifo_requeue,
-	.drop = NULL,
-
-	.init = pfifo_init,
-	.reset = pfifo_reset,
-	.destroy = NULL,
-	.change = NULL,
-
-	.dump = pfifo_dump,
-};
-
Index: wireless-dev/net/d80211/Kconfig
===================================================================
--- wireless-dev.orig/net/d80211/Kconfig
+++ wireless-dev/net/d80211/Kconfig
@@ -3,6 +3,7 @@ config D80211
 	select CRYPTO
 	select CRYPTO_ARC4
 	select CRYPTO_AES
+	select NET_SCHED
 	---help---
 	This option enables the hardware independent IEEE 802.11
 	networking stack.

--

             reply	other threads:[~2006-10-25 22:04 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-25 22:04 David Kimdon [this message]
2006-10-25 23:29 ` [patch] d80211: use pfifo_qdisc_ops rather than d80211-specific qdisc Patrick McHardy
2006-10-26  1:21   ` Patrick McHardy
2006-10-26  2:38     ` Jeff Garzik
2006-10-26  3:37       ` Simon Barber
2006-10-26  5:04         ` Jeff Garzik
2006-10-26  5:15           ` Simon Barber
2006-11-01 10:28             ` Jiri Benc
2006-11-01 14:20               ` John W. Linville
2006-11-01 18:31                 ` James Ketrenos
2006-11-02  0:30                   ` Jeff Garzik
2006-11-02  1:48                     ` d80211 merge (was Re: [patch] d80211: use pfifo_qdisc_ops rather than d80211-specific qdisc) James Ketrenos
2006-11-02  2:55                       ` Jeff Garzik
2006-11-02  8:49                         ` cfg80211/nl80211/WE (was: Re: d80211 merge) Johannes Berg
2006-11-02  8:59                           ` cfg80211/nl80211/WE Jeff Garzik
2006-11-02 10:56                           ` cfg80211/nl80211/WE (was: Re: d80211 merge) Christoph Hellwig
2006-11-02 12:03                             ` Johannes Berg
2006-11-02 12:16                   ` [patch] d80211: use pfifo_qdisc_ops rather than d80211-specific qdisc Christoph Hellwig
2006-11-02 14:05                     ` Jiri Benc
2006-11-02 14:18                       ` Christoph Hellwig
2006-11-02 14:32                         ` Johannes Berg
2006-11-02 14:41                           ` Jochen Friedrich
2006-11-02 14:45                           ` Christoph Hellwig
2006-11-02 15:02                             ` Johannes Berg
2006-11-02 16:38                             ` Simon Barber
2006-11-02 15:42                         ` Jiri Benc
2006-11-02 16:09                           ` Sven-Haegar Koch
2006-11-02 18:38                             ` Jiri Benc
2006-11-02 20:58                               ` Dan Williams
2006-11-02 21:27                               ` Simon Barber
2006-11-02 22:48                                 ` Stephen Hemminger
2006-11-02 23:15                                   ` Luis R. Rodriguez
2006-11-02 14:22                       ` Johannes Berg
2006-11-02 16:33                         ` [patch] d80211: use pfifo_qdisc_ops rather thand80211-specific qdisc Simon Barber
2006-11-02 16:43                           ` Johannes Berg
2006-11-02 22:34                             ` Stephen Hemminger
2006-11-02 22:56                               ` Johannes Berg
2006-11-03 19:23                                 ` [patch] d80211: use pfifo_qdisc_ops rather thand80211-specificqdisc Simon Barber
2006-11-03 19:29                                   ` Simon Barber
2006-11-03 19:39                                     ` John W. Linville
2006-11-03 23:07                                   ` Johannes Berg
2006-11-04  2:20                                     ` [patch] d80211: use pfifo_qdisc_ops ratherthand80211-specificqdisc Simon Barber
2006-11-02 14:06                     ` [patch] d80211: use pfifo_qdisc_ops rather than d80211-specific qdisc John W. Linville
2006-10-26  1:34   ` Simon Barber
2006-10-26  1:49     ` Patrick McHardy
2006-10-26  3:17       ` Simon Barber
2006-10-26  2:04     ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061025220406.GA5413@devicescape.com \
    --to=david.kimdon@devicescape.com \
    --cc=jbenc@suse.cz \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.