aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-11-16 14:49:58 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-11-17 16:19:31 -0500
commit4bce22b9b84032c77c7e038b07b24fcc706dfc10 (patch)
tree3c4ee91f19ca703d98956d8aa9f352df8ca10505
parent488f6ba75b5deaa7e89d6cdac07e0f2120899b6f (diff)
mac80211: defines for AC numbers
In many places we've just hardcoded the AC numbers -- which is a relic from the original mac80211 (d80211). Add constants for them so we know what we're talking about. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--include/net/mac80211.h14
-rw-r--r--net/mac80211/wme.c11
2 files changed, 24 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 1248369a7c30..5b0fff2178bb 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -97,6 +97,20 @@ enum ieee80211_max_queues {
97}; 97};
98 98
99/** 99/**
100 * enum ieee80211_ac_numbers - AC numbers as used in mac80211
101 * @IEEE80211_AC_VO: voice
102 * @IEEE80211_AC_VI: video
103 * @IEEE80211_AC_BE: best effort
104 * @IEEE80211_AC_BK: background
105 */
106enum ieee80211_ac_numbers {
107 IEEE80211_AC_VO = 0,
108 IEEE80211_AC_VI = 1,
109 IEEE80211_AC_BE = 2,
110 IEEE80211_AC_BK = 3,
111};
112
113/**
100 * struct ieee80211_tx_queue_params - transmit queue configuration 114 * struct ieee80211_tx_queue_params - transmit queue configuration
101 * 115 *
102 * The information provided in this structure is required for QoS 116 * The information provided in this structure is required for QoS
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index 34e6d02da779..58e75bbc1f91 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -21,7 +21,16 @@
21/* Default mapping in classifier to work with default 21/* Default mapping in classifier to work with default
22 * queue setup. 22 * queue setup.
23 */ 23 */
24const int ieee802_1d_to_ac[8] = { 2, 3, 3, 2, 1, 1, 0, 0 }; 24const int ieee802_1d_to_ac[8] = {
25 IEEE80211_AC_BE,
26 IEEE80211_AC_BK,
27 IEEE80211_AC_BK,
28 IEEE80211_AC_BE,
29 IEEE80211_AC_VI,
30 IEEE80211_AC_VI,
31 IEEE80211_AC_VO,
32 IEEE80211_AC_VO
33};
25 34
26static int wme_downgrade_ac(struct sk_buff *skb) 35static int wme_downgrade_ac(struct sk_buff *skb)
27{ 36{