From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 7/7] mac80211: use IEEE80211_NUM_ACS
Date: Wed, 28 Mar 2012 11:04:29 +0200 [thread overview]
Message-ID: <20120328090433.095113620@sipsolutions.net> (raw)
In-Reply-To: 20120328090422.367469100@sipsolutions.net
From: Johannes Berg <johannes.berg@intel.com>
When comparing hw->queues to determine if the
device is QoS capable, use IEEE80211_NUM_ACS
instead of just 4.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/ibss.c | 2 +-
net/mac80211/iface.c | 2 +-
net/mac80211/mlme.c | 7 ++++---
net/mac80211/tx.c | 2 +-
net/mac80211/wme.c | 4 ++--
5 files changed, 9 insertions(+), 8 deletions(-)
--- a/net/mac80211/ibss.c 2012-03-23 17:46:30.000000000 +0100
+++ b/net/mac80211/ibss.c 2012-03-23 17:47:04.000000000 +0100
@@ -167,7 +167,7 @@ static void __ieee80211_sta_join_ibss(st
chan, channel_type);
}
- if (local->hw.queues >= 4) {
+ if (local->hw.queues >= IEEE80211_NUM_ACS) {
pos = skb_put(skb, 9);
*pos++ = WLAN_EID_VENDOR_SPECIFIC;
*pos++ = 7; /* len */
--- a/net/mac80211/iface.c 2012-03-23 17:46:30.000000000 +0100
+++ b/net/mac80211/iface.c 2012-03-23 17:47:04.000000000 +0100
@@ -676,7 +676,7 @@ static u16 ieee80211_monitor_select_queu
struct ieee80211_hdr *hdr;
struct ieee80211_radiotap_header *rtap = (void *)skb->data;
- if (local->hw.queues < 4)
+ if (local->hw.queues < IEEE80211_NUM_ACS)
return 0;
if (skb->len < 4 ||
--- a/net/mac80211/mlme.c 2012-03-23 17:46:30.000000000 +0100
+++ b/net/mac80211/mlme.c 2012-03-23 17:47:04.000000000 +0100
@@ -1125,7 +1125,7 @@ static void ieee80211_sta_wmm_params(str
if (!local->ops->conf_tx)
return;
- if (local->hw.queues < 4)
+ if (local->hw.queues < IEEE80211_NUM_ACS)
return;
if (!wmm_param)
@@ -3299,7 +3299,7 @@ int ieee80211_mgd_assoc(struct ieee80211
/* Also disable HT if we don't support it or the AP doesn't use WMM */
sband = local->hw.wiphy->bands[req->bss->channel->band];
if (!sband->ht_cap.ht_supported ||
- local->hw.queues < 4 || !bss->wmm_used)
+ local->hw.queues < IEEE80211_NUM_ACS || !bss->wmm_used)
ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
memcpy(&ifmgd->ht_capa, &req->ht_capa, sizeof(ifmgd->ht_capa));
@@ -3322,7 +3322,8 @@ int ieee80211_mgd_assoc(struct ieee80211
ifmgd->ap_smps = ifmgd->req_smps;
assoc_data->capability = req->bss->capability;
- assoc_data->wmm = bss->wmm_used && (local->hw.queues >= 4);
+ assoc_data->wmm = bss->wmm_used &&
+ (local->hw.queues >= IEEE80211_NUM_ACS);
assoc_data->supp_rates = bss->supp_rates;
assoc_data->supp_rates_len = bss->supp_rates_len;
--- a/net/mac80211/tx.c 2012-03-23 17:46:30.000000000 +0100
+++ b/net/mac80211/tx.c 2012-03-23 17:47:04.000000000 +0100
@@ -1929,7 +1929,7 @@ netdev_tx_t ieee80211_subif_start_xmit(s
wme_sta = true;
/* receiver and we are QoS enabled, use a QoS type frame */
- if (wme_sta && local->hw.queues >= 4) {
+ if (wme_sta && local->hw.queues >= IEEE80211_NUM_ACS) {
fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA);
hdrlen += 2;
}
--- a/net/mac80211/wme.c 2012-03-23 17:46:30.000000000 +0100
+++ b/net/mac80211/wme.c 2012-03-23 17:47:04.000000000 +0100
@@ -79,7 +79,7 @@ u16 ieee80211_select_queue_80211(struct
{
u8 *p;
- if (local->hw.queues < 4)
+ if (local->hw.queues < IEEE80211_NUM_ACS)
return 0;
if (!ieee80211_is_data(hdr->frame_control)) {
@@ -106,7 +106,7 @@ u16 ieee80211_select_queue(struct ieee80
const u8 *ra = NULL;
bool qos = false;
- if (local->hw.queues < 4 || skb->len < 6) {
+ if (local->hw.queues < IEEE80211_NUM_ACS || skb->len < 6) {
skb->priority = 0; /* required for correct WPA/11i MIC */
return 0;
}
prev parent reply other threads:[~2012-03-28 9:07 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 ` [PATCH 4/7] mac80211: decouple # of netdev queues from HW queues Johannes Berg
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 ` Johannes Berg [this message]
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=20120328090433.095113620@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).