From: Johannes Berg <johannes.berg@intel.com>
Date: Tue, 16 Nov 2010 19:49:58 +0000 (-0800)
Subject: mac80211: defines for AC numbers
X-Git-Tag: firefly_0821_release~7613^2~3122^2~169^2^2~241
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4bce22b9b84032c77c7e038b07b24fcc706dfc10;p=firefly-linux-kernel-4.4.55.git

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>
---

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
@@ -96,6 +96,20 @@ enum ieee80211_max_queues {
 	IEEE80211_MAX_QUEUES =		4,
 };
 
+/**
+ * enum ieee80211_ac_numbers - AC numbers as used in mac80211
+ * @IEEE80211_AC_VO: voice
+ * @IEEE80211_AC_VI: video
+ * @IEEE80211_AC_BE: best effort
+ * @IEEE80211_AC_BK: background
+ */
+enum ieee80211_ac_numbers {
+	IEEE80211_AC_VO		= 0,
+	IEEE80211_AC_VI		= 1,
+	IEEE80211_AC_BE		= 2,
+	IEEE80211_AC_BK		= 3,
+};
+
 /**
  * struct ieee80211_tx_queue_params - transmit queue configuration
  *
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 @@
 /* Default mapping in classifier to work with default
  * queue setup.
  */
-const int ieee802_1d_to_ac[8] = { 2, 3, 3, 2, 1, 1, 0, 0 };
+const int ieee802_1d_to_ac[8] = {
+	IEEE80211_AC_BE,
+	IEEE80211_AC_BK,
+	IEEE80211_AC_BK,
+	IEEE80211_AC_BE,
+	IEEE80211_AC_VI,
+	IEEE80211_AC_VI,
+	IEEE80211_AC_VO,
+	IEEE80211_AC_VO
+};
 
 static int wme_downgrade_ac(struct sk_buff *skb)
 {