From: Zhu Yi <yi.zhu@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
Ron Rindjunsky <ron.rindjunsky@intel.com>
Subject: [PATCH 25/25] iwlwifi: map A-MPDU HW queue to mac80211 A-MPDU SW queue
Date: Mon, 5 May 2008 10:22:52 +0800 [thread overview]
Message-ID: <1209954172-3092-26-git-send-email-yi.zhu@intel.com> (raw)
In-Reply-To: <1209954172-3092-25-git-send-email-yi.zhu@intel.com>
From: Ron Rindjunsky <ron.rindjunsky@intel.com>
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>
---
drivers/net/wireless/iwlwifi/iwl-4965.c | 5 ++++-
drivers/net/wireless/iwlwifi/iwl4965-base.c | 23 +++++++++++------------
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 554b0d6..0b44138 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -3330,13 +3330,16 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv,
* block-ack window (we assume that they've been successfully
* transmitted ... if not, it's too late anyway). */
if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) {
+ /* calculate mac80211 ampdu sw queue to wake */
+ int ampdu_q =
+ scd_flow - IWL_BACK_QUEUE_FIRST_ID + priv->hw->queues;
int freed = iwl4965_tx_queue_reclaim(priv, scd_flow, index);
priv->stations[ba_resp->sta_id].
tid[ba_resp->tid].tfds_in_queue -= freed;
if (iwl4965_queue_space(&txq->q) > txq->q.low_mark &&
priv->mac80211_registered &&
agg->state != IWL_EMPTYING_HW_QUEUE_DELBA)
- ieee80211_wake_queue(priv->hw, scd_flow);
+ ieee80211_wake_queue(priv->hw, ampdu_q);
iwl4965_check_empty_hw_queue(priv, ba_resp->sta_id,
ba_resp->tid, scd_flow);
}
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 3b091fc..45bbce7 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -2357,12 +2357,6 @@ int iwl4965_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
nfreed++;
}
-/* if (iwl4965_queue_space(q) > q->low_mark && (txq_id >= 0) &&
- (txq_id != IWL_CMD_QUEUE_NUM) &&
- priv->mac80211_registered)
- ieee80211_wake_queue(priv->hw, txq_id); */
-
-
return nfreed;
}
@@ -2586,7 +2580,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
}
if (txq->q.read_ptr != (scd_ssn & 0xff)) {
- int freed;
+ int freed, ampdu_q;
index = iwl_queue_dec_wrap(scd_ssn & 0xff, txq->q.n_bd);
IWL_DEBUG_TX_REPLY("Retry scheduler reclaim scd_ssn "
"%d index %d\n", scd_ssn , index);
@@ -2595,9 +2589,15 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
if (iwl4965_queue_space(&txq->q) > txq->q.low_mark &&
txq_id >= 0 && priv->mac80211_registered &&
- agg->state != IWL_EMPTYING_HW_QUEUE_DELBA)
- ieee80211_wake_queue(priv->hw, txq_id);
-
+ agg->state != IWL_EMPTYING_HW_QUEUE_DELBA) {
+ /* calculate mac80211 ampdu sw queue to wake */
+ ampdu_q = txq_id - IWL_BACK_QUEUE_FIRST_ID +
+ priv->hw->queues;
+ if (agg->state == IWL_AGG_OFF)
+ ieee80211_wake_queue(priv->hw, txq_id);
+ else
+ ieee80211_wake_queue(priv->hw, ampdu_q);
+ }
iwl4965_check_empty_hw_queue(priv, sta_id, tid, txq_id);
}
} else {
@@ -2622,8 +2622,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
if (tid != MAX_TID_COUNT)
priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
if (iwl4965_queue_space(&txq->q) > txq->q.low_mark &&
- (txq_id >= 0) &&
- priv->mac80211_registered)
+ (txq_id >= 0) && priv->mac80211_registered)
ieee80211_wake_queue(priv->hw, txq_id);
if (tid != MAX_TID_COUNT)
iwl4965_check_empty_hw_queue(priv, sta_id, tid, txq_id);
--
1.5.3.6
next prev parent reply other threads:[~2008-05-05 2:24 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1209954172-3092-1-git-send-email-yi.zhu@intel.com>
2008-05-05 2:22 ` [PATCH 01/25] iwlwifi: move RX code to iwl-rx.c Zhu Yi
2008-05-05 2:22 ` [PATCH 02/25] iwlwifi-5000: rename iwl5000_init_nic to iwl5000_init_config Zhu Yi
2008-05-05 2:22 ` [PATCH 03/25] iwlwifi: don't override association channel with control channel Zhu Yi
2008-05-05 2:22 ` [PATCH 04/25] iwlwifi: remove 4965 from station_entry Zhu Yi
2008-05-05 2:22 ` [PATCH 05/25] iwlwifi: debugfs EEPROM dump Zhu Yi
2008-05-05 2:22 ` [PATCH 06/25] iwlwifi: remove 4965 from rx_packet Zhu Yi
2008-05-05 2:22 ` [PATCH 07/25] iwlwifi: generalize iwl4965_send_add_station function Zhu Yi
2008-05-05 2:22 ` [PATCH 08/25] iwlwifi-5000: add build_addsta_hcmd handler for 5000 HW Zhu Yi
2008-05-05 2:22 ` [PATCH 09/25] iwlwifi: Fix unconditional access to station->tidp[].agg Zhu Yi
2008-05-05 2:22 ` [PATCH 10/25] iwlwifi: Fix built-in compilation of iwlcore Zhu Yi
2008-05-05 2:22 ` [PATCH 11/25] iwlwifi: Fix built-in compilation of iwlcore (part 2) Zhu Yi
2008-05-05 2:22 ` [PATCH 12/25] iwlwifi: Allow building iwl3945 without iwl4965 Zhu Yi
2008-05-05 2:22 ` [PATCH 13/25] iwlwifi: move per driverdebug_level to per device Zhu Yi
2008-05-05 2:22 ` [PATCH 14/25] iwlwifi: move iwl4965_set_rxon_ht into iwlcore Zhu Yi
2008-05-05 2:22 ` [PATCH 15/25] iwlwifi: create disable SCD Tx FIFOs handler Zhu Yi
2008-05-05 2:22 ` [PATCH 16/25] iwlwifi: move NIC init and Tx queues init to iwlcore Zhu Yi
2008-05-05 2:22 ` [PATCH 17/25] iwlwifi: compile iwl-sta into iwlcore Zhu Yi
2008-05-05 2:22 ` [PATCH 18/25] iwlwifi: move iwl4965_init_alive_start to iwl-4965.c Zhu Yi
2008-05-05 2:22 ` [PATCH 19/25] iwlwifi: fix compile error when CONFIG_MAC80211_DEBUGFS is not selected Zhu Yi
2008-05-05 2:22 ` [PATCH 20/25] iwlwifi : Set monitor mode for 4965 Zhu Yi
2008-05-05 2:22 ` [PATCH 21/25] iwlwifi : Set monitor mode for 3945 Zhu Yi
2008-05-05 2:22 ` [PATCH 22/25] iwlwifi: handle shared memory Rx index access Zhu Yi
2008-05-05 2:22 ` [PATCH 23/25] iwlwifi: remove 4965 prefix from iwl4965_kw and iwl4965_tx_queue Zhu Yi
2008-05-05 2:22 ` [PATCH 24/25] iwlwifi: fix spinlock used before initialized Zhu Yi
2008-05-05 2:22 ` Zhu Yi [this message]
2008-05-06 9:09 ` [PATCH 25/25] iwlwifi: map A-MPDU HW queue to mac80211 A-MPDU SW queue Tomas Winkler
2008-05-06 9:11 ` Tomas Winkler
2008-05-06 9:38 ` Johannes Berg
2008-05-06 10:34 ` Tomas Winkler
2008-05-06 10:37 ` Johannes Berg
2008-05-06 10:46 ` Tomas Winkler
2008-05-06 10:48 ` Johannes Berg
2008-05-06 9:16 ` Johannes Berg
2008-05-05 7:11 ` [PATCH 20/25] iwlwifi : Set monitor mode for 4965 Johannes Berg
2008-05-05 8:05 ` Zhu Yi
2008-05-05 8:28 ` Johannes Berg
2008-05-05 8:53 ` Zhu Yi
2008-05-05 9:05 ` Johannes Berg
2008-05-05 9:31 ` Tomas Winkler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1209954172-3092-26-git-send-email-yi.zhu@intel.com \
--to=yi.zhu@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=ron.rindjunsky@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox