diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-11-21 06:25:31 -0500 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-12-16 10:22:52 -0500 |
commit | 3c69b5954225b41cfa57338b17466816072d55a2 (patch) | |
tree | 60ff5619d3240cd39863d92fab2ef07447d7543f /drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c | |
parent | bc23773059ecea24cb653994686d230b6be08536 (diff) |
iwlwifi: tid_data logic move to upper layer - tx AGG alloc
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 tx AGG alloc.
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-tx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c index 4ee5f50643f9..28be8a61ab32 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c | |||
@@ -539,12 +539,9 @@ static int iwlagn_txq_ctx_activate_free(struct iwl_trans *trans) | |||
539 | } | 539 | } |
540 | 540 | ||
541 | int iwl_trans_pcie_tx_agg_alloc(struct iwl_trans *trans, | 541 | int iwl_trans_pcie_tx_agg_alloc(struct iwl_trans *trans, |
542 | enum iwl_rxon_context_id ctx, int sta_id, | 542 | int sta_id, int tid) |
543 | int tid, u16 *ssn) | ||
544 | { | 543 | { |
545 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | 544 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); |
546 | struct iwl_tid_data *tid_data; | ||
547 | unsigned long flags; | ||
548 | int txq_id; | 545 | int txq_id; |
549 | 546 | ||
550 | txq_id = iwlagn_txq_ctx_activate_free(trans); | 547 | txq_id = iwlagn_txq_ctx_activate_free(trans); |
@@ -553,28 +550,9 @@ int iwl_trans_pcie_tx_agg_alloc(struct iwl_trans *trans, | |||
553 | return -ENXIO; | 550 | return -ENXIO; |
554 | } | 551 | } |
555 | 552 | ||
556 | spin_lock_irqsave(&trans->shrd->sta_lock, flags); | 553 | trans->shrd->tid_data[sta_id][tid].agg.txq_id = txq_id; |
557 | tid_data = &trans->shrd->tid_data[sta_id][tid]; | ||
558 | tid_data->agg.txq_id = txq_id; | ||
559 | tid_data->agg.ssn = SEQ_TO_SN(tid_data->seq_number); | ||
560 | |||
561 | *ssn = tid_data->agg.ssn; | ||
562 | iwl_set_swq_id(&trans_pcie->txq[txq_id], get_ac_from_tid(tid), txq_id); | 554 | iwl_set_swq_id(&trans_pcie->txq[txq_id], get_ac_from_tid(tid), txq_id); |
563 | 555 | ||
564 | if (*ssn == tid_data->next_reclaimed) { | ||
565 | IWL_DEBUG_TX_QUEUES(trans, "Proceed: ssn = next_recl = %d", | ||
566 | tid_data->agg.ssn); | ||
567 | tid_data->agg.state = IWL_AGG_ON; | ||
568 | iwl_start_tx_ba_trans_ready(priv(trans), ctx, sta_id, tid); | ||
569 | } else { | ||
570 | IWL_DEBUG_TX_QUEUES(trans, "Can't proceed: ssn %d, " | ||
571 | "next_recl = %d", | ||
572 | tid_data->agg.ssn, | ||
573 | tid_data->next_reclaimed); | ||
574 | tid_data->agg.state = IWL_EMPTYING_HW_QUEUE_ADDBA; | ||
575 | } | ||
576 | spin_unlock_irqrestore(&trans->shrd->sta_lock, flags); | ||
577 | |||
578 | return 0; | 556 | return 0; |
579 | } | 557 | } |
580 | 558 | ||