From: Johannes Berg <johannes@sipsolutions.net>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, vinay@linux.vnet.ibm.com,
krkumar2@in.ibm.com, mchan@broadcom.com, Matheos.Worku@Sun.COM,
linux-wireless@vger.kernel.org,
Ron Rindjunsky <rindjon@googlemail.com>
Subject: Re: [PATCH 32/39]: mac80211: Reimplement WME using ->select_queue().
Date: Thu, 03 Jul 2008 12:23:03 +0200 [thread overview]
Message-ID: <1215080583.13270.38.camel@johannes.berg> (raw)
In-Reply-To: <20080703.000521.13130101.davem@davemloft.net> (sfid-20080703_103230_813110_7C480890)
Here's a little cleanup patch. My kernel is still compiling so I haven'=
t
tested it yet though. Note it removes =EF=BB=BFnetif_is_multiqueue(). I=
think
the first hunk to =EF=BB=BFnet/mac80211/main.c is a bugfix for your cha=
nges,
while the rest is just cleanups.
Ron, your Intel address is bouncing (=EF=BB=BF550 #5.1.0 Address reject=
ed),
might want to check that out.
As Dave said, his patch breaks requeuing and first I thought that wasn'=
t
important, but I think the point was to put frames we have already
queued for a station into the right aggregation queue so that it can be
aggregated when aggregation is started; and that we don't try to send i=
t
out on an aggregation queue when aggregation is stopped.
johannes
---
include/linux/netdevice.h | 11 -----------
net/mac80211/Kconfig | 10 ----------
net/mac80211/Makefile | 4 ++--
net/mac80211/ieee80211_i.h | 9 ---------
net/mac80211/main.c | 9 ++-------
net/mac80211/util.c | 14 ++------------
net/mac80211/wme.c | 14 +-------------
net/mac80211/wme.h | 22 +---------------------
8 files changed, 8 insertions(+), 85 deletions(-)
--- everything.orig/net/mac80211/ieee80211_i.h 2008-07-03 11:43:40.0000=
00000 +0200
+++ everything/net/mac80211/ieee80211_i.h 2008-07-03 11:50:28.000000000=
+0200
@@ -757,15 +757,6 @@ struct ieee80211_local {
#endif
};
=20
-static inline int ieee80211_is_multiqueue(struct ieee80211_local *loca=
l)
-{
-#ifdef CONFIG_MAC80211_QOS
- return netif_is_multiqueue(local->mdev);
-#else
- return 0;
-#endif
-}
-
/* this struct represents 802.11n's RA/TID combination */
struct ieee80211_ra_tid {
u8 ra[ETH_ALEN];
--- everything.orig/net/mac80211/util.c 2008-07-03 11:43:53.000000000 +=
0200
+++ everything/net/mac80211/util.c 2008-07-03 11:51:02.000000000 +0200
@@ -363,12 +363,7 @@ void ieee80211_wake_queue(struct ieee802
if (test_bit(queue, local->queues_pending)) {
tasklet_schedule(&local->tx_pending_tasklet);
} else {
- if (ieee80211_is_multiqueue(local)) {
- netif_wake_subqueue(local->mdev, queue);
- } else {
- WARN_ON(queue !=3D 0);
- netif_wake_queue(local->mdev);
- }
+ netif_wake_subqueue(local->mdev, queue);
}
}
EXPORT_SYMBOL(ieee80211_wake_queue);
@@ -377,12 +372,7 @@ void ieee80211_stop_queue(struct ieee802
{
struct ieee80211_local *local =3D hw_to_local(hw);
=20
- if (ieee80211_is_multiqueue(local)) {
- netif_stop_subqueue(local->mdev, queue);
- } else {
- WARN_ON(queue !=3D 0);
- netif_stop_queue(local->mdev);
- }
+ netif_stop_subqueue(local->mdev, queue);
}
EXPORT_SYMBOL(ieee80211_stop_queue);
=20
--- everything.orig/net/mac80211/wme.c 2008-07-03 11:43:19.000000000 +0=
200
+++ everything/net/mac80211/wme.c 2008-07-03 11:54:48.000000000 +0200
@@ -115,8 +115,7 @@ static u16 classify80211(struct sk_buff=20
}
=20
=20
-static u16 ieee80211_select_queue(struct net_device *dev,
- struct sk_buff *skb)
+u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb=
)
{
struct ieee80211_hdr *hdr =3D (struct ieee80211_hdr *) skb->data;
struct ieee80211_local *local =3D wdev_priv(dev->ieee80211_ptr);
@@ -157,17 +156,6 @@ static u16 ieee80211_select_queue(struct
return queue;
}
=20
-void ieee80211_install_qdisc(struct net_device *dev)
-{
- dev->select_queue =3D ieee80211_select_queue;
-}
-
-
-int ieee80211_qdisc_installed(struct net_device *dev)
-{
- return dev->select_queue =3D=3D ieee80211_select_queue;
-}
-
int ieee80211_ht_agg_queue_add(struct ieee80211_local *local,
struct sta_info *sta, u16 tid)
{
--- everything.orig/net/mac80211/wme.h 2008-07-03 11:43:09.000000000 +0=
200
+++ everything/net/mac80211/wme.h 2008-07-03 12:02:29.000000000 +0200
@@ -31,30 +31,10 @@ static inline int WLAN_FC_IS_QOS_DATA(u1
return (fc & 0x8C) =3D=3D 0x88;
}
=20
-#ifdef CONFIG_MAC80211_QOS
-void ieee80211_install_qdisc(struct net_device *dev);
-int ieee80211_qdisc_installed(struct net_device *dev);
int ieee80211_ht_agg_queue_add(struct ieee80211_local *local,
struct sta_info *sta, u16 tid);
void ieee80211_ht_agg_queue_remove(struct ieee80211_local *local,
struct sta_info *sta, u16 tid);
-#else
-static inline void ieee80211_install_qdisc(struct net_device *dev)
-{
-}
-static inline int ieee80211_qdisc_installed(struct net_device *dev)
-{
- return 0;
-}
-static inline int ieee80211_ht_agg_queue_add(struct ieee80211_local *l=
ocal,
- struct sta_info *sta, u16 tid)
-{
- return -EAGAIN;
-}
-static inline void ieee80211_ht_agg_queue_remove(struct ieee80211_loca=
l *local,
- struct sta_info *sta, u16 tid)
-{
-}
-#endif /* CONFIG_NET_SCHED */
+u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb=
);
=20
#endif /* _WME_H */
--- everything.orig/include/linux/netdevice.h 2008-07-03 11:51:50.00000=
0000 +0200
+++ everything/include/linux/netdevice.h 2008-07-03 11:51:56.000000000 =
+0200
@@ -1175,17 +1175,6 @@ static inline void netif_wake_subqueue(s
__netif_schedule(txq);
}
=20
-/**
- * netif_is_multiqueue - test if device has multiple transmit queues
- * @dev: network device
- *
- * Check if device has multiple transmit queues
- */
-static inline int netif_is_multiqueue(const struct net_device *dev)
-{
- return (dev->num_tx_queues > 1);
-}
-
/* Use this variant when it is known for sure that it
* is executing from hardware interrupt context or with hardware inter=
rupts
* disabled.
--- everything.orig/net/mac80211/Kconfig 2008-07-03 11:43:31.000000000 =
+0200
+++ everything/net/mac80211/Kconfig 2008-07-03 11:52:57.000000000 +0200
@@ -11,16 +11,6 @@ config MAC80211
This option enables the hardware independent IEEE 802.11
networking stack.
=20
-config MAC80211_QOS
- def_bool y
- depends on MAC80211
- depends on NET_SCHED
-
-comment "QoS/HT support disabled"
- depends on MAC80211 && !MAC80211_QOS
-comment "QoS/HT support needs CONFIG_NET_SCHED"
- depends on MAC80211 && !NET_SCHED
-
menu "Rate control algorithm selection"
depends on MAC80211 !=3D n
=20
--- everything.orig/net/mac80211/Makefile 2008-07-03 11:52:42.000000000=
+0200
+++ everything/net/mac80211/Makefile 2008-07-03 11:52:51.000000000 +020=
0
@@ -26,10 +26,10 @@ mac80211-y :=3D \
tx.o \
key.o \
util.o \
- event.o
+ event.o \
+ wme.o
=20
mac80211-$(CONFIG_MAC80211_LEDS) +=3D led.o
-mac80211-$(CONFIG_MAC80211_QOS) +=3D wme.o
mac80211-$(CONFIG_MAC80211_DEBUGFS) +=3D \
debugfs.o \
debugfs_sta.o \
--- everything.orig/net/mac80211/main.c 2008-07-03 11:52:13.000000000 +=
0200
+++ everything/net/mac80211/main.c 2008-07-03 11:56:51.000000000 +0200
@@ -114,7 +114,7 @@ static int ieee80211_master_open(struct=20
if (res)
return res;
=20
- netif_start_queue(local->mdev);
+ netif_tx_start_all_queues(local->mdev);
=20
return 0;
}
@@ -1667,17 +1667,12 @@ int ieee80211_register_hw(struct ieee802
* We use the number of queues for feature tests (QoS, HT) internally
* so restrict them appropriately.
*/
-#ifdef CONFIG_MAC80211_QOS
if (hw->queues > IEEE80211_MAX_QUEUES)
hw->queues =3D IEEE80211_MAX_QUEUES;
if (hw->ampdu_queues > IEEE80211_MAX_AMPDU_QUEUES)
hw->ampdu_queues =3D IEEE80211_MAX_AMPDU_QUEUES;
if (hw->queues < 4)
hw->ampdu_queues =3D 0;
-#else
- hw->queues =3D 1;
- hw->ampdu_queues =3D 0;
-#endif
=20
/* for now, mdev needs sub_if_data :/ */
mdev =3D alloc_netdev_mq(sizeof(struct ieee80211_sub_if_data),
@@ -1775,7 +1770,7 @@ int ieee80211_register_hw(struct ieee802
goto fail_wep;
}
=20
- ieee80211_install_qdisc(local->mdev);
+ local->mdev->select_queue =3D ieee80211_select_queue;
=20
/* add one default STA interface */
result =3D ieee80211_if_add(local->mdev, "wlan%d", NULL,
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-07-03 12:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-03 7:05 [PATCH 32/39]: mac80211: Reimplement WME using ->select_queue() David Miller
2008-07-03 9:14 ` Johannes Berg
2008-07-03 10:23 ` Johannes Berg [this message]
2008-07-03 12:02 ` Johannes Berg
2008-07-03 11:27 ` Tomas Winkler
2008-07-03 12:12 ` Johannes Berg
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=1215080583.13270.38.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=Matheos.Worku@Sun.COM \
--cc=davem@davemloft.net \
--cc=krkumar2@in.ibm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=rindjon@googlemail.com \
--cc=vinay@linux.vnet.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox