diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-11-21 13:25:31 +0200 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-12-16 07:23:06 -0800 |
commit | 76bc10fcd128ad028cf77c62e179cd20dc2ffecf (patch) | |
tree | 5eaf7e228c6257a39b1995f35d2c8501bbe64fae /drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | |
parent | 20addec6ac77fbffa1c913f8d07d3a78a9e50321 (diff) |
iwlwifi: tid_data logic move to upper layer - txqid
The tid_data is not related to the transport layer, so move
the logic that depends on it to the upper layer.
This patch deals with the mapping of RA / TID to HW queues in AGG.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans-pcie.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c index 5d44ec5f111c..801e0c90b049 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c @@ -1108,10 +1108,10 @@ static int iwl_trans_pcie_tx(struct iwl_trans *trans, struct sk_buff *skb, info->flags, tid_data->agg.state); IWL_ERR(trans, "sta_id = %d, tid = %d " "txq_id = %d, seq_num = %d", sta_id, - tid, tid_data->agg.txq_id, + tid, trans_pcie->agg_txq[sta_id][tid], SEQ_TO_SN(seq_number)); } - txq_id = tid_data->agg.txq_id; + txq_id = trans_pcie->agg_txq[sta_id][tid]; is_agg = true; } seq_number += 0x10; @@ -1275,7 +1275,7 @@ static int iwl_trans_pcie_request_irq(struct iwl_trans *trans) return 0; } -static void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int sta_id, int tid, +static int iwl_trans_pcie_reclaim(struct iwl_trans *trans, int sta_id, int tid, int txq_id, int ssn, u32 status, struct sk_buff_head *skbs) { @@ -1287,6 +1287,20 @@ static void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int sta_id, int tid, txq->time_stamp = jiffies; + if (unlikely(txq_id >= IWLAGN_FIRST_AMPDU_QUEUE && + txq_id != trans_pcie->agg_txq[sta_id][tid])) { + /* + * FIXME: this is a uCode bug which need to be addressed, + * log the information and return for now. + * Since it is can possibly happen very often and in order + * not to fill the syslog, don't use IWL_ERR or IWL_WARN + */ + IWL_DEBUG_TX_QUEUES(trans, "Bad queue mapping txq_id %d, " + "agg_txq[sta_id[tid] %d", txq_id, + trans_pcie->agg_txq[sta_id][tid]); + return 1; + } + if (txq->q.read_ptr != tfd_num) { IWL_DEBUG_TX_REPLY(trans, "[Q %d | AC %d] %d -> %d (%d)\n", txq_id, iwl_get_queue_ac(txq), txq->q.read_ptr, @@ -1297,6 +1311,7 @@ static void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int sta_id, int tid, status != TX_STATUS_FAIL_PASSIVE_NO_RX)) iwl_wake_queue(trans, txq, "Packets reclaimed"); } + return 0; } static void iwl_trans_pcie_free(struct iwl_trans *trans) |