aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRon Rindjunsky <ron.rindjunsky@intel.com>2008-05-04 07:48:18 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-14 16:29:36 -0400
commit0d0b2c1c49814ee54f1b4efd2c715a7465219ede (patch)
treefe8858cc44317f209b373a24e015602f59175f3a
parent07346f81e87d6e4cca7ae9adfa711d0c61c87b56 (diff)
iwlwifi: map A-MPDU HW queue to mac80211 A-MPDU SW queue
This patch maps A-MPDU HW queue to mac80211 SW queue scheme (as introduced in patch "mac80211: QoS related cleanups"), when trying to perform ieee80211_wake_queue. Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c23
2 files changed, 15 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 9546582e983f..70c0455b622d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -3547,13 +3547,16 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv,
3547 * block-ack window (we assume that they've been successfully 3547 * block-ack window (we assume that they've been successfully
3548 * transmitted ... if not, it's too late anyway). */ 3548 * transmitted ... if not, it's too late anyway). */
3549 if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) { 3549 if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) {
3550 /* calculate mac80211 ampdu sw queue to wake */
3551 int ampdu_q =
3552 scd_flow - IWL_BACK_QUEUE_FIRST_ID + priv->hw->queues;
3550 int freed = iwl4965_tx_queue_reclaim(priv, scd_flow, index); 3553 int freed = iwl4965_tx_queue_reclaim(priv, scd_flow, index);
3551 priv->stations[ba_resp->sta_id]. 3554 priv->stations[ba_resp->sta_id].
3552 tid[ba_resp->tid].tfds_in_queue -= freed; 3555 tid[ba_resp->tid].tfds_in_queue -= freed;
3553 if (iwl4965_queue_space(&txq->q) > txq->q.low_mark && 3556 if (iwl4965_queue_space(&txq->q) > txq->q.low_mark &&
3554 priv->mac80211_registered && 3557 priv->mac80211_registered &&
3555 agg->state != IWL_EMPTYING_HW_QUEUE_DELBA) 3558 agg->state != IWL_EMPTYING_HW_QUEUE_DELBA)
3556 ieee80211_wake_queue(priv->hw, scd_flow); 3559 ieee80211_wake_queue(priv->hw, ampdu_q);
3557 iwl4965_check_empty_hw_queue(priv, ba_resp->sta_id, 3560 iwl4965_check_empty_hw_queue(priv, ba_resp->sta_id,
3558 ba_resp->tid, scd_flow); 3561 ba_resp->tid, scd_flow);
3559 } 3562 }
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 4406fc72d881..54534270d46f 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -2568,12 +2568,6 @@ int iwl4965_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
2568 nfreed++; 2568 nfreed++;
2569 } 2569 }
2570 2570
2571/* if (iwl4965_queue_space(q) > q->low_mark && (txq_id >= 0) &&
2572 (txq_id != IWL_CMD_QUEUE_NUM) &&
2573 priv->mac80211_registered)
2574 ieee80211_wake_queue(priv->hw, txq_id); */
2575
2576
2577 return nfreed; 2571 return nfreed;
2578} 2572}
2579 2573
@@ -2797,7 +2791,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
2797 } 2791 }
2798 2792
2799 if (txq->q.read_ptr != (scd_ssn & 0xff)) { 2793 if (txq->q.read_ptr != (scd_ssn & 0xff)) {
2800 int freed; 2794 int freed, ampdu_q;
2801 index = iwl_queue_dec_wrap(scd_ssn & 0xff, txq->q.n_bd); 2795 index = iwl_queue_dec_wrap(scd_ssn & 0xff, txq->q.n_bd);
2802 IWL_DEBUG_TX_REPLY("Retry scheduler reclaim scd_ssn " 2796 IWL_DEBUG_TX_REPLY("Retry scheduler reclaim scd_ssn "
2803 "%d index %d\n", scd_ssn , index); 2797 "%d index %d\n", scd_ssn , index);
@@ -2806,9 +2800,15 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
2806 2800
2807 if (iwl4965_queue_space(&txq->q) > txq->q.low_mark && 2801 if (iwl4965_queue_space(&txq->q) > txq->q.low_mark &&
2808 txq_id >= 0 && priv->mac80211_registered && 2802 txq_id >= 0 && priv->mac80211_registered &&
2809 agg->state != IWL_EMPTYING_HW_QUEUE_DELBA) 2803 agg->state != IWL_EMPTYING_HW_QUEUE_DELBA) {
2810 ieee80211_wake_queue(priv->hw, txq_id); 2804 /* calculate mac80211 ampdu sw queue to wake */
2811 2805 ampdu_q = txq_id - IWL_BACK_QUEUE_FIRST_ID +
2806 priv->hw->queues;
2807 if (agg->state == IWL_AGG_OFF)
2808 ieee80211_wake_queue(priv->hw, txq_id);
2809 else
2810 ieee80211_wake_queue(priv->hw, ampdu_q);
2811 }
2812 iwl4965_check_empty_hw_queue(priv, sta_id, tid, txq_id); 2812 iwl4965_check_empty_hw_queue(priv, sta_id, tid, txq_id);
2813 } 2813 }
2814 } else { 2814 } else {
@@ -2833,8 +2833,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
2833 if (tid != MAX_TID_COUNT) 2833 if (tid != MAX_TID_COUNT)
2834 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; 2834 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
2835 if (iwl4965_queue_space(&txq->q) > txq->q.low_mark && 2835 if (iwl4965_queue_space(&txq->q) > txq->q.low_mark &&
2836 (txq_id >= 0) && 2836 (txq_id >= 0) && priv->mac80211_registered)
2837 priv->mac80211_registered)
2838 ieee80211_wake_queue(priv->hw, txq_id); 2837 ieee80211_wake_queue(priv->hw, txq_id);
2839 if (tid != MAX_TID_COUNT) 2838 if (tid != MAX_TID_COUNT)
2840 iwl4965_check_empty_hw_queue(priv, sta_id, tid, txq_id); 2839 iwl4965_check_empty_hw_queue(priv, sta_id, tid, txq_id);