mac80211: use AC constants
authorJohannes Berg <johannes.berg@intel.com>
Tue, 27 Mar 2012 12:18:40 +0000 (14:18 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 10 Apr 2012 18:54:07 +0000 (14:54 -0400)
Use the AC constants instead of hard-coding
the numbers with comments.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/util.c

index 4cb0fd2f5af9ff3ce13ee1f2d8449fdd60161ebf..1d4b8b7a5a333f4d8a14431ddf09007b704528dc 100644 (file)
@@ -790,20 +790,20 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata,
                        aCWmin = 15;
 
                switch (queue) {
-               case 3: /* AC_BK */
+               case IEEE80211_AC_BK:
                        qparam.cw_max = aCWmax;
                        qparam.cw_min = aCWmin;
                        qparam.txop = 0;
                        qparam.aifs = 7;
                        break;
                default: /* never happens but let's not leave undefined */
-               case 2: /* AC_BE */
+               case IEEE80211_AC_BE:
                        qparam.cw_max = aCWmax;
                        qparam.cw_min = aCWmin;
                        qparam.txop = 0;
                        qparam.aifs = 3;
                        break;
-               case 1: /* AC_VI */
+               case IEEE80211_AC_VI:
                        qparam.cw_max = aCWmin;
                        qparam.cw_min = (aCWmin + 1) / 2 - 1;
                        if (use_11b)
@@ -812,7 +812,7 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata,
                                qparam.txop = 3008/32;
                        qparam.aifs = 2;
                        break;
-               case 0: /* AC_VO */
+               case IEEE80211_AC_VO:
                        qparam.cw_max = (aCWmin + 1) / 2 - 1;
                        qparam.cw_min = (aCWmin + 1) / 4 - 1;
                        if (use_11b)