diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-28 05:04:29 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-10 14:56:10 -0400 |
commit | 32c5057b22a60b23353dda93c57e475856ca286c (patch) | |
tree | 68a80dd3fb3a93f0eacf1566c3dd60877efe6cf2 | |
parent | 4644ae89033872a62b4fea6ca96b958e115efdc0 (diff) |
mac80211: use IEEE80211_NUM_ACS
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/mac80211/ibss.c | 2 | ||||
-rw-r--r-- | net/mac80211/iface.c | 2 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 7 | ||||
-rw-r--r-- | net/mac80211/tx.c | 2 | ||||
-rw-r--r-- | net/mac80211/wme.c | 4 |
5 files changed, 9 insertions, 8 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 547cd7e3018..e910449dead 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -167,7 +167,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
167 | chan, channel_type); | 167 | chan, channel_type); |
168 | } | 168 | } |
169 | 169 | ||
170 | if (local->hw.queues >= 4) { | 170 | if (local->hw.queues >= IEEE80211_NUM_ACS) { |
171 | pos = skb_put(skb, 9); | 171 | pos = skb_put(skb, 9); |
172 | *pos++ = WLAN_EID_VENDOR_SPECIFIC; | 172 | *pos++ = WLAN_EID_VENDOR_SPECIFIC; |
173 | *pos++ = 7; /* len */ | 173 | *pos++ = 7; /* len */ |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index efa9409865a..efb433d3dc2 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -676,7 +676,7 @@ static u16 ieee80211_monitor_select_queue(struct net_device *dev, | |||
676 | struct ieee80211_hdr *hdr; | 676 | struct ieee80211_hdr *hdr; |
677 | struct ieee80211_radiotap_header *rtap = (void *)skb->data; | 677 | struct ieee80211_radiotap_header *rtap = (void *)skb->data; |
678 | 678 | ||
679 | if (local->hw.queues < 4) | 679 | if (local->hw.queues < IEEE80211_NUM_ACS) |
680 | return 0; | 680 | return 0; |
681 | 681 | ||
682 | if (skb->len < 4 || | 682 | if (skb->len < 4 || |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4974f998c7d..93d484c8a0b 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1134,7 +1134,7 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local, | |||
1134 | if (!local->ops->conf_tx) | 1134 | if (!local->ops->conf_tx) |
1135 | return; | 1135 | return; |
1136 | 1136 | ||
1137 | if (local->hw.queues < 4) | 1137 | if (local->hw.queues < IEEE80211_NUM_ACS) |
1138 | return; | 1138 | return; |
1139 | 1139 | ||
1140 | if (!wmm_param) | 1140 | if (!wmm_param) |
@@ -3312,7 +3312,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
3312 | /* Also disable HT if we don't support it or the AP doesn't use WMM */ | 3312 | /* Also disable HT if we don't support it or the AP doesn't use WMM */ |
3313 | sband = local->hw.wiphy->bands[req->bss->channel->band]; | 3313 | sband = local->hw.wiphy->bands[req->bss->channel->band]; |
3314 | if (!sband->ht_cap.ht_supported || | 3314 | if (!sband->ht_cap.ht_supported || |
3315 | local->hw.queues < 4 || !bss->wmm_used) | 3315 | local->hw.queues < IEEE80211_NUM_ACS || !bss->wmm_used) |
3316 | ifmgd->flags |= IEEE80211_STA_DISABLE_11N; | 3316 | ifmgd->flags |= IEEE80211_STA_DISABLE_11N; |
3317 | 3317 | ||
3318 | memcpy(&ifmgd->ht_capa, &req->ht_capa, sizeof(ifmgd->ht_capa)); | 3318 | memcpy(&ifmgd->ht_capa, &req->ht_capa, sizeof(ifmgd->ht_capa)); |
@@ -3335,7 +3335,8 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
3335 | ifmgd->ap_smps = ifmgd->req_smps; | 3335 | ifmgd->ap_smps = ifmgd->req_smps; |
3336 | 3336 | ||
3337 | assoc_data->capability = req->bss->capability; | 3337 | assoc_data->capability = req->bss->capability; |
3338 | assoc_data->wmm = bss->wmm_used && (local->hw.queues >= 4); | 3338 | assoc_data->wmm = bss->wmm_used && |
3339 | (local->hw.queues >= IEEE80211_NUM_ACS); | ||
3339 | assoc_data->supp_rates = bss->supp_rates; | 3340 | assoc_data->supp_rates = bss->supp_rates; |
3340 | assoc_data->supp_rates_len = bss->supp_rates_len; | 3341 | assoc_data->supp_rates_len = bss->supp_rates_len; |
3341 | assoc_data->ht_operation_ie = | 3342 | assoc_data->ht_operation_ie = |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index b35d319cea8..14a01c81f95 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1928,7 +1928,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1928 | wme_sta = true; | 1928 | wme_sta = true; |
1929 | 1929 | ||
1930 | /* receiver and we are QoS enabled, use a QoS type frame */ | 1930 | /* receiver and we are QoS enabled, use a QoS type frame */ |
1931 | if (wme_sta && local->hw.queues >= 4) { | 1931 | if (wme_sta && local->hw.queues >= IEEE80211_NUM_ACS) { |
1932 | fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA); | 1932 | fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA); |
1933 | hdrlen += 2; | 1933 | hdrlen += 2; |
1934 | } | 1934 | } |
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index 16b48395a46..c3d643a6536 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c | |||
@@ -79,7 +79,7 @@ u16 ieee80211_select_queue_80211(struct ieee80211_local *local, | |||
79 | { | 79 | { |
80 | u8 *p; | 80 | u8 *p; |
81 | 81 | ||
82 | if (local->hw.queues < 4) | 82 | if (local->hw.queues < IEEE80211_NUM_ACS) |
83 | return 0; | 83 | return 0; |
84 | 84 | ||
85 | if (!ieee80211_is_data(hdr->frame_control)) { | 85 | if (!ieee80211_is_data(hdr->frame_control)) { |
@@ -106,7 +106,7 @@ u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata, | |||
106 | const u8 *ra = NULL; | 106 | const u8 *ra = NULL; |
107 | bool qos = false; | 107 | bool qos = false; |
108 | 108 | ||
109 | if (local->hw.queues < 4 || skb->len < 6) { | 109 | if (local->hw.queues < IEEE80211_NUM_ACS || skb->len < 6) { |
110 | skb->priority = 0; /* required for correct WPA/11i MIC */ | 110 | skb->priority = 0; /* required for correct WPA/11i MIC */ |
111 | return 0; | 111 | return 0; |
112 | } | 112 | } |