diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-04-17 10:39:03 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2012-04-23 17:31:07 -0400 |
commit | 1479177ba69023a5bb9480fb6914f4a343452887 (patch) | |
tree | 4ecfbc44187c35e547c46e2dbc9fb840cd6cc741 /drivers/net/wireless/iwlwifi | |
parent | 65de7e84fdc71a409f1d97aba8e44ece26628f51 (diff) |
iwlwifi: use new mac80211 queue scheme
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 89 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-mac80211.c | 32 |
4 files changed, 66 insertions, 74 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index 587cfe6739a8..f2e9f298a947 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -463,6 +463,10 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
463 | else | 463 | else |
464 | txq_id = ctx->ac_to_queue[skb_get_queue_mapping(skb)]; | 464 | txq_id = ctx->ac_to_queue[skb_get_queue_mapping(skb)]; |
465 | 465 | ||
466 | WARN_ON_ONCE(!is_agg && txq_id != info->hw_queue); | ||
467 | WARN_ON_ONCE(is_agg && | ||
468 | priv->queue_to_mac80211[txq_id] != info->hw_queue); | ||
469 | |||
466 | if (iwl_trans_tx(priv->trans, skb, dev_cmd, txq_id)) | 470 | if (iwl_trans_tx(priv->trans, skb, dev_cmd, txq_id)) |
467 | goto drop_unlock_sta; | 471 | goto drop_unlock_sta; |
468 | 472 | ||
@@ -492,14 +496,14 @@ drop_unlock_priv: | |||
492 | return -1; | 496 | return -1; |
493 | } | 497 | } |
494 | 498 | ||
495 | static int iwlagn_alloc_agg_txq(struct iwl_priv *priv, int ac) | 499 | static int iwlagn_alloc_agg_txq(struct iwl_priv *priv, int mq) |
496 | { | 500 | { |
497 | int q; | 501 | int q; |
498 | 502 | ||
499 | for (q = IWLAGN_FIRST_AMPDU_QUEUE; | 503 | for (q = IWLAGN_FIRST_AMPDU_QUEUE; |
500 | q < priv->cfg->base_params->num_of_queues; q++) { | 504 | q < priv->cfg->base_params->num_of_queues; q++) { |
501 | if (!test_and_set_bit(q, priv->agg_q_alloc)) { | 505 | if (!test_and_set_bit(q, priv->agg_q_alloc)) { |
502 | priv->queue_to_ac[q] = ac; | 506 | priv->queue_to_mac80211[q] = mq; |
503 | return q; | 507 | return q; |
504 | } | 508 | } |
505 | } | 509 | } |
@@ -510,7 +514,7 @@ static int iwlagn_alloc_agg_txq(struct iwl_priv *priv, int ac) | |||
510 | static void iwlagn_dealloc_agg_txq(struct iwl_priv *priv, int q) | 514 | static void iwlagn_dealloc_agg_txq(struct iwl_priv *priv, int q) |
511 | { | 515 | { |
512 | clear_bit(q, priv->agg_q_alloc); | 516 | clear_bit(q, priv->agg_q_alloc); |
513 | priv->queue_to_ac[q] = IWL_INVALID_AC; | 517 | priv->queue_to_mac80211[q] = IWL_INVALID_MAC80211_QUEUE; |
514 | } | 518 | } |
515 | 519 | ||
516 | int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif, | 520 | int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif, |
@@ -602,6 +606,7 @@ turn_off: | |||
602 | int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif, | 606 | int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif, |
603 | struct ieee80211_sta *sta, u16 tid, u16 *ssn) | 607 | struct ieee80211_sta *sta, u16 tid, u16 *ssn) |
604 | { | 608 | { |
609 | struct iwl_rxon_context *ctx = iwl_rxon_ctx_from_vif(vif); | ||
605 | struct iwl_tid_data *tid_data; | 610 | struct iwl_tid_data *tid_data; |
606 | int sta_id, txq_id, ret; | 611 | int sta_id, txq_id, ret; |
607 | 612 | ||
@@ -621,7 +626,7 @@ int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif, | |||
621 | return -ENXIO; | 626 | return -ENXIO; |
622 | } | 627 | } |
623 | 628 | ||
624 | txq_id = iwlagn_alloc_agg_txq(priv, tid_to_ac[tid]); | 629 | txq_id = iwlagn_alloc_agg_txq(priv, ctx->ac_to_queue[tid_to_ac[tid]]); |
625 | if (txq_id < 0) { | 630 | if (txq_id < 0) { |
626 | IWL_DEBUG_TX_QUEUES(priv, | 631 | IWL_DEBUG_TX_QUEUES(priv, |
627 | "No free aggregation queue for %pM/%d\n", | 632 | "No free aggregation queue for %pM/%d\n", |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index e219868464bf..b53852dcdbfd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -578,24 +578,6 @@ static const u8 iwlagn_pan_ac_to_queue[] = { | |||
578 | 7, 6, 5, 4, | 578 | 7, 6, 5, 4, |
579 | }; | 579 | }; |
580 | 580 | ||
581 | static const u8 iwlagn_bss_queue_to_ac[] = { | ||
582 | IEEE80211_AC_VO, | ||
583 | IEEE80211_AC_VI, | ||
584 | IEEE80211_AC_BE, | ||
585 | IEEE80211_AC_BK, | ||
586 | }; | ||
587 | |||
588 | static const u8 iwlagn_pan_queue_to_ac[] = { | ||
589 | IEEE80211_AC_VO, | ||
590 | IEEE80211_AC_VI, | ||
591 | IEEE80211_AC_BE, | ||
592 | IEEE80211_AC_BK, | ||
593 | IEEE80211_AC_BK, | ||
594 | IEEE80211_AC_BE, | ||
595 | IEEE80211_AC_VI, | ||
596 | IEEE80211_AC_VO, | ||
597 | }; | ||
598 | |||
599 | void iwl_init_context(struct iwl_priv *priv, u32 ucode_flags) | 581 | void iwl_init_context(struct iwl_priv *priv, u32 ucode_flags) |
600 | { | 582 | { |
601 | int i; | 583 | int i; |
@@ -1030,12 +1012,12 @@ void iwlagn_prepare_restart(struct iwl_priv *priv) | |||
1030 | priv->bt_status = bt_status; | 1012 | priv->bt_status = bt_status; |
1031 | priv->bt_is_sco = bt_is_sco; | 1013 | priv->bt_is_sco = bt_is_sco; |
1032 | 1014 | ||
1033 | /* reset all queues */ | 1015 | /* reset aggregation queues */ |
1034 | for (i = 0; i < IEEE80211_NUM_ACS; i++) | ||
1035 | atomic_set(&priv->ac_stop_count[i], 0); | ||
1036 | |||
1037 | for (i = IWLAGN_FIRST_AMPDU_QUEUE; i < IWL_MAX_HW_QUEUES; i++) | 1016 | for (i = IWLAGN_FIRST_AMPDU_QUEUE; i < IWL_MAX_HW_QUEUES; i++) |
1038 | priv->queue_to_ac[i] = IWL_INVALID_AC; | 1017 | priv->queue_to_mac80211[i] = IWL_INVALID_MAC80211_QUEUE; |
1018 | /* and stop counts */ | ||
1019 | for (i = 0; i < IWL_MAX_HW_QUEUES; i++) | ||
1020 | atomic_set(&priv->queue_stop_count[i], 0); | ||
1039 | 1021 | ||
1040 | memset(priv->agg_q_alloc, 0, sizeof(priv->agg_q_alloc)); | 1022 | memset(priv->agg_q_alloc, 0, sizeof(priv->agg_q_alloc)); |
1041 | } | 1023 | } |
@@ -1491,8 +1473,6 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, | |||
1491 | STATISTICS_NOTIFICATION, | 1473 | STATISTICS_NOTIFICATION, |
1492 | REPLY_TX, | 1474 | REPLY_TX, |
1493 | }; | 1475 | }; |
1494 | const u8 *q_to_ac; | ||
1495 | int n_q_to_ac; | ||
1496 | int i; | 1476 | int i; |
1497 | 1477 | ||
1498 | /************************ | 1478 | /************************ |
@@ -1575,16 +1555,12 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, | |||
1575 | trans_cfg.queue_to_fifo = iwlagn_ipan_queue_to_tx_fifo; | 1555 | trans_cfg.queue_to_fifo = iwlagn_ipan_queue_to_tx_fifo; |
1576 | trans_cfg.n_queue_to_fifo = | 1556 | trans_cfg.n_queue_to_fifo = |
1577 | ARRAY_SIZE(iwlagn_ipan_queue_to_tx_fifo); | 1557 | ARRAY_SIZE(iwlagn_ipan_queue_to_tx_fifo); |
1578 | q_to_ac = iwlagn_pan_queue_to_ac; | ||
1579 | n_q_to_ac = ARRAY_SIZE(iwlagn_pan_queue_to_ac); | ||
1580 | } else { | 1558 | } else { |
1581 | priv->sta_key_max_num = STA_KEY_MAX_NUM; | 1559 | priv->sta_key_max_num = STA_KEY_MAX_NUM; |
1582 | trans_cfg.cmd_queue = IWL_DEFAULT_CMD_QUEUE_NUM; | 1560 | trans_cfg.cmd_queue = IWL_DEFAULT_CMD_QUEUE_NUM; |
1583 | trans_cfg.queue_to_fifo = iwlagn_default_queue_to_tx_fifo; | 1561 | trans_cfg.queue_to_fifo = iwlagn_default_queue_to_tx_fifo; |
1584 | trans_cfg.n_queue_to_fifo = | 1562 | trans_cfg.n_queue_to_fifo = |
1585 | ARRAY_SIZE(iwlagn_default_queue_to_tx_fifo); | 1563 | ARRAY_SIZE(iwlagn_default_queue_to_tx_fifo); |
1586 | q_to_ac = iwlagn_bss_queue_to_ac; | ||
1587 | n_q_to_ac = ARRAY_SIZE(iwlagn_bss_queue_to_ac); | ||
1588 | } | 1564 | } |
1589 | 1565 | ||
1590 | /* Configure transport layer */ | 1566 | /* Configure transport layer */ |
@@ -1670,8 +1646,6 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, | |||
1670 | trans_cfg.queue_to_fifo = iwlagn_default_queue_to_tx_fifo; | 1646 | trans_cfg.queue_to_fifo = iwlagn_default_queue_to_tx_fifo; |
1671 | trans_cfg.n_queue_to_fifo = | 1647 | trans_cfg.n_queue_to_fifo = |
1672 | ARRAY_SIZE(iwlagn_default_queue_to_tx_fifo); | 1648 | ARRAY_SIZE(iwlagn_default_queue_to_tx_fifo); |
1673 | q_to_ac = iwlagn_bss_queue_to_ac; | ||
1674 | n_q_to_ac = ARRAY_SIZE(iwlagn_bss_queue_to_ac); | ||
1675 | 1649 | ||
1676 | /* Configure transport layer again*/ | 1650 | /* Configure transport layer again*/ |
1677 | iwl_trans_configure(priv->trans, &trans_cfg); | 1651 | iwl_trans_configure(priv->trans, &trans_cfg); |
@@ -1680,14 +1654,13 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, | |||
1680 | /******************* | 1654 | /******************* |
1681 | * 5. Setup priv | 1655 | * 5. Setup priv |
1682 | *******************/ | 1656 | *******************/ |
1683 | for (i = 0; i < IEEE80211_NUM_ACS; i++) | ||
1684 | atomic_set(&priv->ac_stop_count[i], 0); | ||
1685 | |||
1686 | for (i = 0; i < IWL_MAX_HW_QUEUES; i++) { | 1657 | for (i = 0; i < IWL_MAX_HW_QUEUES; i++) { |
1687 | if (i < n_q_to_ac) | 1658 | priv->queue_to_mac80211[i] = IWL_INVALID_MAC80211_QUEUE; |
1688 | priv->queue_to_ac[i] = q_to_ac[i]; | 1659 | if (i < IWLAGN_FIRST_AMPDU_QUEUE && |
1689 | else | 1660 | i != IWL_DEFAULT_CMD_QUEUE_NUM && |
1690 | priv->queue_to_ac[i] = IWL_INVALID_AC; | 1661 | i != IWL_IPAN_CMD_QUEUE_NUM) |
1662 | priv->queue_to_mac80211[i] = i; | ||
1663 | atomic_set(&priv->queue_stop_count[i], 0); | ||
1691 | } | 1664 | } |
1692 | 1665 | ||
1693 | WARN_ON(trans_cfg.queue_to_fifo[trans_cfg.cmd_queue] != | 1666 | WARN_ON(trans_cfg.queue_to_fifo[trans_cfg.cmd_queue] != |
@@ -2256,56 +2229,56 @@ static void iwl_wimax_active(struct iwl_op_mode *op_mode) | |||
2256 | void iwl_stop_sw_queue(struct iwl_op_mode *op_mode, int queue) | 2229 | void iwl_stop_sw_queue(struct iwl_op_mode *op_mode, int queue) |
2257 | { | 2230 | { |
2258 | struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode); | 2231 | struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode); |
2259 | int ac = priv->queue_to_ac[queue]; | 2232 | int mq = priv->queue_to_mac80211[queue]; |
2260 | 2233 | ||
2261 | if (WARN_ON_ONCE(ac == IWL_INVALID_AC)) | 2234 | if (WARN_ON_ONCE(mq == IWL_INVALID_MAC80211_QUEUE)) |
2262 | return; | 2235 | return; |
2263 | 2236 | ||
2264 | if (atomic_inc_return(&priv->ac_stop_count[ac]) > 1) { | 2237 | if (atomic_inc_return(&priv->queue_stop_count[mq]) > 1) { |
2265 | IWL_DEBUG_TX_QUEUES(priv, | 2238 | IWL_DEBUG_TX_QUEUES(priv, |
2266 | "queue %d (AC %d) already stopped\n", | 2239 | "queue %d (mac80211 %d) already stopped\n", |
2267 | queue, ac); | 2240 | queue, mq); |
2268 | return; | 2241 | return; |
2269 | } | 2242 | } |
2270 | 2243 | ||
2271 | set_bit(ac, &priv->transport_queue_stop); | 2244 | set_bit(mq, &priv->transport_queue_stop); |
2272 | ieee80211_stop_queue(priv->hw, ac); | 2245 | ieee80211_stop_queue(priv->hw, mq); |
2273 | } | 2246 | } |
2274 | 2247 | ||
2275 | void iwl_wake_sw_queue(struct iwl_op_mode *op_mode, int queue) | 2248 | void iwl_wake_sw_queue(struct iwl_op_mode *op_mode, int queue) |
2276 | { | 2249 | { |
2277 | struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode); | 2250 | struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode); |
2278 | int ac = priv->queue_to_ac[queue]; | 2251 | int mq = priv->queue_to_mac80211[queue]; |
2279 | 2252 | ||
2280 | if (WARN_ON_ONCE(ac == IWL_INVALID_AC)) | 2253 | if (WARN_ON_ONCE(mq == IWL_INVALID_MAC80211_QUEUE)) |
2281 | return; | 2254 | return; |
2282 | 2255 | ||
2283 | if (atomic_dec_return(&priv->ac_stop_count[ac]) > 0) { | 2256 | if (atomic_dec_return(&priv->queue_stop_count[mq]) > 0) { |
2284 | IWL_DEBUG_TX_QUEUES(priv, | 2257 | IWL_DEBUG_TX_QUEUES(priv, |
2285 | "queue %d (AC %d) already awake\n", | 2258 | "queue %d (mac80211 %d) already awake\n", |
2286 | queue, ac); | 2259 | queue, mq); |
2287 | return; | 2260 | return; |
2288 | } | 2261 | } |
2289 | 2262 | ||
2290 | clear_bit(ac, &priv->transport_queue_stop); | 2263 | clear_bit(mq, &priv->transport_queue_stop); |
2291 | 2264 | ||
2292 | if (!priv->passive_no_rx) | 2265 | if (!priv->passive_no_rx) |
2293 | ieee80211_wake_queue(priv->hw, ac); | 2266 | ieee80211_wake_queue(priv->hw, mq); |
2294 | } | 2267 | } |
2295 | 2268 | ||
2296 | void iwlagn_lift_passive_no_rx(struct iwl_priv *priv) | 2269 | void iwlagn_lift_passive_no_rx(struct iwl_priv *priv) |
2297 | { | 2270 | { |
2298 | int ac; | 2271 | int mq; |
2299 | 2272 | ||
2300 | if (!priv->passive_no_rx) | 2273 | if (!priv->passive_no_rx) |
2301 | return; | 2274 | return; |
2302 | 2275 | ||
2303 | for (ac = IEEE80211_AC_VO; ac < IEEE80211_NUM_ACS; ac++) { | 2276 | for (mq = 0; mq < IWLAGN_FIRST_AMPDU_QUEUE; mq++) { |
2304 | if (!test_bit(ac, &priv->transport_queue_stop)) { | 2277 | if (!test_bit(mq, &priv->transport_queue_stop)) { |
2305 | IWL_DEBUG_TX_QUEUES(priv, "Wake queue %d"); | 2278 | IWL_DEBUG_TX_QUEUES(priv, "Wake queue %d", mq); |
2306 | ieee80211_wake_queue(priv->hw, ac); | 2279 | ieee80211_wake_queue(priv->hw, mq); |
2307 | } else { | 2280 | } else { |
2308 | IWL_DEBUG_TX_QUEUES(priv, "Don't wake queue %d"); | 2281 | IWL_DEBUG_TX_QUEUES(priv, "Don't wake queue %d", mq); |
2309 | } | 2282 | } |
2310 | } | 2283 | } |
2311 | 2284 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index b0646765e41f..f70219c3b122 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -727,9 +727,9 @@ struct iwl_priv { | |||
727 | 727 | ||
728 | unsigned long transport_queue_stop; | 728 | unsigned long transport_queue_stop; |
729 | bool passive_no_rx; | 729 | bool passive_no_rx; |
730 | #define IWL_INVALID_AC 0xff | 730 | #define IWL_INVALID_MAC80211_QUEUE 0xff |
731 | u8 queue_to_ac[IWL_MAX_HW_QUEUES]; | 731 | u8 queue_to_mac80211[IWL_MAX_HW_QUEUES]; |
732 | atomic_t ac_stop_count[IEEE80211_NUM_ACS]; | 732 | atomic_t queue_stop_count[IWL_MAX_HW_QUEUES]; |
733 | 733 | ||
734 | unsigned long agg_q_alloc[BITS_TO_LONGS(IWL_MAX_HW_QUEUES)]; | 734 | unsigned long agg_q_alloc[BITS_TO_LONGS(IWL_MAX_HW_QUEUES)]; |
735 | 735 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c index 9670554dc469..b30bb0c637ca 100644 --- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c +++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c | |||
@@ -146,7 +146,13 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, | |||
146 | IEEE80211_HW_AMPDU_AGGREGATION | | 146 | IEEE80211_HW_AMPDU_AGGREGATION | |
147 | IEEE80211_HW_NEED_DTIM_PERIOD | | 147 | IEEE80211_HW_NEED_DTIM_PERIOD | |
148 | IEEE80211_HW_SPECTRUM_MGMT | | 148 | IEEE80211_HW_SPECTRUM_MGMT | |
149 | IEEE80211_HW_REPORTS_TX_ACK_STATUS; | 149 | IEEE80211_HW_REPORTS_TX_ACK_STATUS | |
150 | IEEE80211_HW_QUEUE_CONTROL | | ||
151 | IEEE80211_HW_SUPPORTS_PS | | ||
152 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS | | ||
153 | IEEE80211_HW_SCAN_WHILE_IDLE; | ||
154 | |||
155 | hw->offchannel_tx_hw_queue = IWL_AUX_QUEUE; | ||
150 | 156 | ||
151 | /* | 157 | /* |
152 | * Including the following line will crash some AP's. This | 158 | * Including the following line will crash some AP's. This |
@@ -155,10 +161,6 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, | |||
155 | hw->max_tx_aggregation_subframes = LINK_QUAL_AGG_FRAME_LIMIT_DEF; | 161 | hw->max_tx_aggregation_subframes = LINK_QUAL_AGG_FRAME_LIMIT_DEF; |
156 | */ | 162 | */ |
157 | 163 | ||
158 | hw->flags |= IEEE80211_HW_SUPPORTS_PS | | ||
159 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS | | ||
160 | IEEE80211_HW_SCAN_WHILE_IDLE; | ||
161 | |||
162 | if (priv->hw_params.sku & EEPROM_SKU_CAP_11N_ENABLE) | 164 | if (priv->hw_params.sku & EEPROM_SKU_CAP_11N_ENABLE) |
163 | hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS | | 165 | hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS | |
164 | IEEE80211_HW_SUPPORTS_STATIC_SMPS; | 166 | IEEE80211_HW_SUPPORTS_STATIC_SMPS; |
@@ -224,8 +226,11 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, | |||
224 | /* we create the 802.11 header and a zero-length SSID element */ | 226 | /* we create the 802.11 header and a zero-length SSID element */ |
225 | hw->wiphy->max_scan_ie_len = capa->max_probe_length - 24 - 2; | 227 | hw->wiphy->max_scan_ie_len = capa->max_probe_length - 24 - 2; |
226 | 228 | ||
227 | /* Default value; 4 EDCA QOS priorities */ | 229 | /* |
228 | hw->queues = 4; | 230 | * We don't use all queues: 4 and 9 are unused and any |
231 | * aggregation queue gets mapped down to the AC queue. | ||
232 | */ | ||
233 | hw->queues = IWLAGN_FIRST_AMPDU_QUEUE; | ||
229 | 234 | ||
230 | hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL; | 235 | hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL; |
231 | 236 | ||
@@ -1218,7 +1223,7 @@ static int iwl_set_mode(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
1218 | int iwl_setup_interface(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | 1223 | int iwl_setup_interface(struct iwl_priv *priv, struct iwl_rxon_context *ctx) |
1219 | { | 1224 | { |
1220 | struct ieee80211_vif *vif = ctx->vif; | 1225 | struct ieee80211_vif *vif = ctx->vif; |
1221 | int err; | 1226 | int err, ac; |
1222 | 1227 | ||
1223 | lockdep_assert_held(&priv->mutex); | 1228 | lockdep_assert_held(&priv->mutex); |
1224 | 1229 | ||
@@ -1248,11 +1253,20 @@ int iwl_setup_interface(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
1248 | priv->bt_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_HIGH; | 1253 | priv->bt_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_HIGH; |
1249 | } | 1254 | } |
1250 | 1255 | ||
1256 | /* set up queue mappings */ | ||
1257 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) | ||
1258 | vif->hw_queue[ac] = ctx->ac_to_queue[ac]; | ||
1259 | |||
1260 | if (vif->type == NL80211_IFTYPE_AP) | ||
1261 | vif->cab_queue = ctx->mcast_queue; | ||
1262 | else | ||
1263 | vif->cab_queue = IEEE80211_INVAL_HW_QUEUE; | ||
1264 | |||
1251 | return 0; | 1265 | return 0; |
1252 | } | 1266 | } |
1253 | 1267 | ||
1254 | static int iwlagn_mac_add_interface(struct ieee80211_hw *hw, | 1268 | static int iwlagn_mac_add_interface(struct ieee80211_hw *hw, |
1255 | struct ieee80211_vif *vif) | 1269 | struct ieee80211_vif *vif) |
1256 | { | 1270 | { |
1257 | struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); | 1271 | struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); |
1258 | struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv; | 1272 | struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv; |