tx.c (b9f916202997f515456c09e2c893b0dc83049d31) | tx.c (de74c455fd991024be76a535df4d66e96af3896e) |
---|---|
1/****************************************************************************** 2 * 3 * Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved. 4 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH 5 * Copyright(c) 2016 Intel Deutschland GmbH 6 * 7 * Portions of this file are derived from the ipw3945 project, as well 8 * as portions of the ieee80211 subsystem header files. --- 687 unchanged lines hidden (view full) --- 696 txq->id); 697 iwl_trans_unref(trans); 698 } else { 699 iwl_pcie_clear_cmd_in_flight(trans); 700 } 701 spin_unlock_irqrestore(&trans_pcie->reg_lock, flags); 702 } 703 } | 1/****************************************************************************** 2 * 3 * Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved. 4 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH 5 * Copyright(c) 2016 Intel Deutschland GmbH 6 * 7 * Portions of this file are derived from the ipw3945 project, as well 8 * as portions of the ieee80211 subsystem header files. --- 687 unchanged lines hidden (view full) --- 696 txq->id); 697 iwl_trans_unref(trans); 698 } else { 699 iwl_pcie_clear_cmd_in_flight(trans); 700 } 701 spin_unlock_irqrestore(&trans_pcie->reg_lock, flags); 702 } 703 } |
704 txq->active = false; | |
705 706 while (!skb_queue_empty(&txq->overflow_q)) { 707 struct sk_buff *skb = __skb_dequeue(&txq->overflow_q); 708 709 iwl_op_mode_free_skb(trans->op_mode, skb); 710 } 711 712 spin_unlock_bh(&txq->lock); --- 214 unchanged lines hidden (view full) --- 927 * 928 * Destroy all TX DMA queues and structures 929 */ 930void iwl_pcie_tx_free(struct iwl_trans *trans) 931{ 932 int txq_id; 933 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); 934 | 704 705 while (!skb_queue_empty(&txq->overflow_q)) { 706 struct sk_buff *skb = __skb_dequeue(&txq->overflow_q); 707 708 iwl_op_mode_free_skb(trans->op_mode, skb); 709 } 710 711 spin_unlock_bh(&txq->lock); --- 214 unchanged lines hidden (view full) --- 926 * 927 * Destroy all TX DMA queues and structures 928 */ 929void iwl_pcie_tx_free(struct iwl_trans *trans) 930{ 931 int txq_id; 932 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); 933 |
934 memset(trans_pcie->queue_used, 0, sizeof(trans_pcie->queue_used)); 935 |
|
935 /* Tx queues */ 936 if (trans_pcie->txq) { 937 for (txq_id = 0; 938 txq_id < trans->cfg->base_params->num_of_queues; txq_id++) 939 iwl_pcie_txq_free(trans, txq_id); 940 } 941 942 kfree(trans_pcie->txq); --- 159 unchanged lines hidden (view full) --- 1102 int last_to_free; 1103 1104 /* This function is not meant to release cmd queue*/ 1105 if (WARN_ON(txq_id == trans_pcie->cmd_queue)) 1106 return; 1107 1108 spin_lock_bh(&txq->lock); 1109 | 936 /* Tx queues */ 937 if (trans_pcie->txq) { 938 for (txq_id = 0; 939 txq_id < trans->cfg->base_params->num_of_queues; txq_id++) 940 iwl_pcie_txq_free(trans, txq_id); 941 } 942 943 kfree(trans_pcie->txq); --- 159 unchanged lines hidden (view full) --- 1103 int last_to_free; 1104 1105 /* This function is not meant to release cmd queue*/ 1106 if (WARN_ON(txq_id == trans_pcie->cmd_queue)) 1107 return; 1108 1109 spin_lock_bh(&txq->lock); 1110 |
1110 if (!txq->active) { | 1111 if (!test_bit(txq_id, trans_pcie->queue_used)) { |
1111 IWL_DEBUG_TX_QUEUES(trans, "Q %d inactive - ignoring idx %d\n", 1112 txq_id, ssn); 1113 goto out; 1114 } 1115 1116 if (txq->read_ptr == tfd_num) 1117 goto out; 1118 --- 287 unchanged lines hidden (view full) --- 1406 IWL_DEBUG_TX_QUEUES(trans, 1407 "Activate queue %d on FIFO %d WrPtr: %d\n", 1408 txq_id, fifo, ssn & 0xff); 1409 } else { 1410 IWL_DEBUG_TX_QUEUES(trans, 1411 "Activate queue %d WrPtr: %d\n", 1412 txq_id, ssn & 0xff); 1413 } | 1112 IWL_DEBUG_TX_QUEUES(trans, "Q %d inactive - ignoring idx %d\n", 1113 txq_id, ssn); 1114 goto out; 1115 } 1116 1117 if (txq->read_ptr == tfd_num) 1118 goto out; 1119 --- 287 unchanged lines hidden (view full) --- 1407 IWL_DEBUG_TX_QUEUES(trans, 1408 "Activate queue %d on FIFO %d WrPtr: %d\n", 1409 txq_id, fifo, ssn & 0xff); 1410 } else { 1411 IWL_DEBUG_TX_QUEUES(trans, 1412 "Activate queue %d WrPtr: %d\n", 1413 txq_id, ssn & 0xff); 1414 } |
1414 1415 txq->active = true; | |
1416} 1417 1418void iwl_trans_pcie_txq_set_shared_mode(struct iwl_trans *trans, u32 txq_id, 1419 bool shared_mode) 1420{ 1421 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); 1422 struct iwl_txq *txq = &trans_pcie->txq[txq_id]; 1423 --- 1058 unchanged lines hidden --- | 1415} 1416 1417void iwl_trans_pcie_txq_set_shared_mode(struct iwl_trans *trans, u32 txq_id, 1418 bool shared_mode) 1419{ 1420 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); 1421 struct iwl_txq *txq = &trans_pcie->txq[txq_id]; 1422 --- 1058 unchanged lines hidden --- |