aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 597d9552fe4b..5393fb3f452c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -273,6 +273,14 @@ void iwl_activate_qos(struct iwl_priv *priv, u8 force)
273} 273}
274EXPORT_SYMBOL(iwl_activate_qos); 274EXPORT_SYMBOL(iwl_activate_qos);
275 275
276/*
277 * AC CWmin CW max AIFSN TXOP Limit TXOP Limit
278 * (802.11b) (802.11a/g)
279 * AC_BK 15 1023 7 0 0
280 * AC_BE 15 1023 3 0 0
281 * AC_VI 7 15 2 6.016ms 3.008ms
282 * AC_VO 3 7 2 3.264ms 1.504ms
283 */
276void iwl_reset_qos(struct iwl_priv *priv) 284void iwl_reset_qos(struct iwl_priv *priv)
277{ 285{
278 u16 cw_min = 15; 286 u16 cw_min = 15;
@@ -304,6 +312,7 @@ void iwl_reset_qos(struct iwl_priv *priv)
304 if (priv->qos_data.qos_active) 312 if (priv->qos_data.qos_active)
305 aifs = 3; 313 aifs = 3;
306 314
315 /* AC_BE */
307 priv->qos_data.def_qos_parm.ac[0].cw_min = cpu_to_le16(cw_min); 316 priv->qos_data.def_qos_parm.ac[0].cw_min = cpu_to_le16(cw_min);
308 priv->qos_data.def_qos_parm.ac[0].cw_max = cpu_to_le16(cw_max); 317 priv->qos_data.def_qos_parm.ac[0].cw_max = cpu_to_le16(cw_max);
309 priv->qos_data.def_qos_parm.ac[0].aifsn = aifs; 318 priv->qos_data.def_qos_parm.ac[0].aifsn = aifs;
@@ -311,6 +320,7 @@ void iwl_reset_qos(struct iwl_priv *priv)
311 priv->qos_data.def_qos_parm.ac[0].reserved1 = 0; 320 priv->qos_data.def_qos_parm.ac[0].reserved1 = 0;
312 321
313 if (priv->qos_data.qos_active) { 322 if (priv->qos_data.qos_active) {
323 /* AC_BK */
314 i = 1; 324 i = 1;
315 priv->qos_data.def_qos_parm.ac[i].cw_min = cpu_to_le16(cw_min); 325 priv->qos_data.def_qos_parm.ac[i].cw_min = cpu_to_le16(cw_min);
316 priv->qos_data.def_qos_parm.ac[i].cw_max = cpu_to_le16(cw_max); 326 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)
318 priv->qos_data.def_qos_parm.ac[i].edca_txop = 0; 328 priv->qos_data.def_qos_parm.ac[i].edca_txop = 0;
319 priv->qos_data.def_qos_parm.ac[i].reserved1 = 0; 329 priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
320 330
331 /* AC_VI */
321 i = 2; 332 i = 2;
322 priv->qos_data.def_qos_parm.ac[i].cw_min = 333 priv->qos_data.def_qos_parm.ac[i].cw_min =
323 cpu_to_le16((cw_min + 1) / 2 - 1); 334 cpu_to_le16((cw_min + 1) / 2 - 1);
324 priv->qos_data.def_qos_parm.ac[i].cw_max = 335 priv->qos_data.def_qos_parm.ac[i].cw_max =
325 cpu_to_le16(cw_max); 336 cpu_to_le16(cw_min);
326 priv->qos_data.def_qos_parm.ac[i].aifsn = 2; 337 priv->qos_data.def_qos_parm.ac[i].aifsn = 2;
327 if (is_legacy) 338 if (is_legacy)
328 priv->qos_data.def_qos_parm.ac[i].edca_txop = 339 priv->qos_data.def_qos_parm.ac[i].edca_txop =
@@ -332,11 +343,12 @@ void iwl_reset_qos(struct iwl_priv *priv)
332 cpu_to_le16(3008); 343 cpu_to_le16(3008);
333 priv->qos_data.def_qos_parm.ac[i].reserved1 = 0; 344 priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
334 345
346 /* AC_VO */
335 i = 3; 347 i = 3;
336 priv->qos_data.def_qos_parm.ac[i].cw_min = 348 priv->qos_data.def_qos_parm.ac[i].cw_min =
337 cpu_to_le16((cw_min + 1) / 4 - 1); 349 cpu_to_le16((cw_min + 1) / 4 - 1);
338 priv->qos_data.def_qos_parm.ac[i].cw_max = 350 priv->qos_data.def_qos_parm.ac[i].cw_max =
339 cpu_to_le16((cw_max + 1) / 2 - 1); 351 cpu_to_le16((cw_min + 1) / 2 - 1);
340 priv->qos_data.def_qos_parm.ac[i].aifsn = 2; 352 priv->qos_data.def_qos_parm.ac[i].aifsn = 2;
341 priv->qos_data.def_qos_parm.ac[i].reserved1 = 0; 353 priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
342 if (is_legacy) 354 if (is_legacy)