]> git.baikalelectronics.ru Git - kernel.git/commitdiff
iwlwifi: default WMM AC parameters
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Fri, 8 May 2009 20:44:45 +0000 (13:44 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 May 2009 19:24:05 +0000 (15:24 -0400)
Set the default WMM AC parameters for BK/BE/VI/VO parameters:

AC        CWmin         CW max      AIFSN      TXOP Limit    TXOP Limit
                                              (802.11b)      (802.11a/g)
AC_BK      15            1023        7           0               0
AC_BE      15            1023        3           0               0
AC_VI       7              15        2          188             94
                                              (6.016ms)       (3.008ms)
AC_VO       3               7        2          102             47
                                              (3.264ms)       (1.504ms)

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-core.c

index 597d9552fe4b07b4dfac8d42c2c4df50d654b3c0..5393fb3f452c260f282a7bfe879ab6db9d6ea0c7 100644 (file)
@@ -273,6 +273,14 @@ void iwl_activate_qos(struct iwl_priv *priv, u8 force)
 }
 EXPORT_SYMBOL(iwl_activate_qos);
 
+/*
+ * AC        CWmin         CW max      AIFSN      TXOP Limit    TXOP Limit
+ *                                              (802.11b)      (802.11a/g)
+ * AC_BK      15            1023        7           0               0
+ * AC_BE      15            1023        3           0               0
+ * AC_VI       7              15        2          6.016ms       3.008ms
+ * AC_VO       3               7        2          3.264ms       1.504ms
+ */
 void iwl_reset_qos(struct iwl_priv *priv)
 {
        u16 cw_min = 15;
@@ -304,6 +312,7 @@ void iwl_reset_qos(struct iwl_priv *priv)
        if (priv->qos_data.qos_active)
                aifs = 3;
 
+       /* AC_BE */
        priv->qos_data.def_qos_parm.ac[0].cw_min = cpu_to_le16(cw_min);
        priv->qos_data.def_qos_parm.ac[0].cw_max = cpu_to_le16(cw_max);
        priv->qos_data.def_qos_parm.ac[0].aifsn = aifs;
@@ -311,6 +320,7 @@ void iwl_reset_qos(struct iwl_priv *priv)
        priv->qos_data.def_qos_parm.ac[0].reserved1 = 0;
 
        if (priv->qos_data.qos_active) {
+               /* AC_BK */
                i = 1;
                priv->qos_data.def_qos_parm.ac[i].cw_min = cpu_to_le16(cw_min);
                priv->qos_data.def_qos_parm.ac[i].cw_max = cpu_to_le16(cw_max);
@@ -318,11 +328,12 @@ void iwl_reset_qos(struct iwl_priv *priv)
                priv->qos_data.def_qos_parm.ac[i].edca_txop = 0;
                priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
 
+               /* AC_VI */
                i = 2;
                priv->qos_data.def_qos_parm.ac[i].cw_min =
                        cpu_to_le16((cw_min + 1) / 2 - 1);
                priv->qos_data.def_qos_parm.ac[i].cw_max =
-                       cpu_to_le16(cw_max);
+                       cpu_to_le16(cw_min);
                priv->qos_data.def_qos_parm.ac[i].aifsn = 2;
                if (is_legacy)
                        priv->qos_data.def_qos_parm.ac[i].edca_txop =
@@ -332,11 +343,12 @@ void iwl_reset_qos(struct iwl_priv *priv)
                                cpu_to_le16(3008);
                priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
 
+               /* AC_VO */
                i = 3;
                priv->qos_data.def_qos_parm.ac[i].cw_min =
                        cpu_to_le16((cw_min + 1) / 4 - 1);
                priv->qos_data.def_qos_parm.ac[i].cw_max =
-                       cpu_to_le16((cw_max + 1) / 2 - 1);
+                       cpu_to_le16((cw_min + 1) / 2 - 1);
                priv->qos_data.def_qos_parm.ac[i].aifsn = 2;
                priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
                if (is_legacy)