From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 4/7] mac80211: decouple # of netdev queues from HW queues
Date: Wed, 28 Mar 2012 11:04:26 +0200 [thread overview]
Message-ID: <20120328090432.701363420@sipsolutions.net> (raw)
In-Reply-To: 20120328090422.367469100@sipsolutions.net
From: Johannes Berg <johannes.berg@intel.com>
When we get more hardware queues, we'll still want
to only have netdev queues per AC, so set it up in
that way. If the hardware doesn't support QoS (by
not supporting at least 4 queues) the netdevs get
a single queue only (this is no change in behavior
as there are no drivers with 2 or 3 queues today.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/iface.c | 6 +++++-
net/mac80211/wme.c | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
--- a/net/mac80211/iface.c 2012-03-23 17:11:52.000000000 +0100
+++ b/net/mac80211/iface.c 2012-03-23 17:11:54.000000000 +0100
@@ -1133,11 +1133,15 @@ int ieee80211_if_add(struct ieee80211_lo
struct net_device *ndev;
struct ieee80211_sub_if_data *sdata = NULL;
int ret, i;
+ int txqs = 1;
ASSERT_RTNL();
+ if (local->hw.queues >= IEEE80211_NUM_ACS)
+ txqs = IEEE80211_NUM_ACS;
+
ndev = alloc_netdev_mqs(sizeof(*sdata) + local->hw.vif_data_size,
- name, ieee80211_if_setup, local->hw.queues, 1);
+ name, ieee80211_if_setup, txqs, 1);
if (!ndev)
return -ENOMEM;
dev_net_set(ndev, wiphy_net(local->hw.wiphy));
--- a/net/mac80211/wme.c 2012-03-23 17:11:52.000000000 +0100
+++ b/net/mac80211/wme.c 2012-03-23 17:11:54.000000000 +0100
@@ -108,7 +108,7 @@ u16 ieee80211_select_queue(struct ieee80
if (local->hw.queues < 4 || skb->len < 6) {
skb->priority = 0; /* required for correct WPA/11i MIC */
- return min_t(u16, local->hw.queues - 1, IEEE80211_AC_BE);
+ return 0;
}
rcu_read_lock();
next prev parent reply other threads:[~2012-03-28 9:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 9:04 [PATCH 0/7] mac80211 queue rework preparations Johannes Berg
2012-03-28 9:04 ` [PATCH 1/7] mac80211: remove antenna_sel_tx TX info field Johannes Berg
2012-03-28 9:04 ` [PATCH 2/7] cfg80211/nl80211: clarify TX queue API Johannes Berg
2012-03-28 9:04 ` [PATCH 3/7] mac80211: refuse TX queue configuration on non-QoS HW Johannes Berg
2012-03-28 9:04 ` Johannes Berg [this message]
2012-03-28 9:04 ` [PATCH 5/7] mac80211: debounce queue stop/wake Johannes Berg
2012-03-28 9:04 ` [PATCH 6/7] mac80211: lazily stop queues in add_pending Johannes Berg
2012-03-28 9:04 ` [PATCH 7/7] mac80211: use IEEE80211_NUM_ACS 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=20120328090432.701363420@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).