aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
diff options
context:
space:
mode:
authorSara Sharon <sara.sharon@intel.com>2016-11-07 08:22:28 -0500
committerLuca Coelho <luciano.coelho@intel.com>2017-01-26 02:39:02 -0500
commitcf90da352a329e755df923fd2c9e810cb75c83a9 (patch)
tree06d199ffbe62450743da43faebefb627216ca5b4 /drivers/net/wireless/intel/iwlwifi/mvm/sta.c
parent758d1a8a8af04c70addb26761796019df267f420 (diff)
iwlwifi: mvm: use mvm_disable_queue instead of sharing logic
When removing inactive queue - use the central disable queue function. This is needed due to a000 changes to come, but is a proper cleanup anyway. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/sta.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/sta.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index cf8222a8b588..40e7fc5f1f1f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -454,13 +454,6 @@ static int iwl_mvm_remove_sta_queue_marking(struct iwl_mvm *mvm, int queue)
454 454
455 rcu_read_unlock(); 455 rcu_read_unlock();
456 456
457 spin_lock_bh(&mvm->queue_info_lock);
458 /* Unmap MAC queues and TIDs from this queue */
459 mvm->queue_info[queue].hw_queue_to_mac80211 = 0;
460 mvm->queue_info[queue].hw_queue_refcount = 0;
461 mvm->queue_info[queue].tid_bitmap = 0;
462 spin_unlock_bh(&mvm->queue_info_lock);
463
464 return disable_agg_tids; 457 return disable_agg_tids;
465} 458}
466 459
@@ -755,28 +748,22 @@ static int iwl_mvm_sta_alloc_queue(struct iwl_mvm *mvm,
755 * first 748 * first
756 */ 749 */
757 if (using_inactive_queue) { 750 if (using_inactive_queue) {
758 struct iwl_scd_txq_cfg_cmd cmd = { 751 u8 txq_curr_ac, sta_id;
759 .scd_queue = queue,
760 .action = SCD_CFG_DISABLE_QUEUE,
761 };
762 u8 txq_curr_ac;
763
764 disable_agg_tids = iwl_mvm_remove_sta_queue_marking(mvm, queue);
765 752
766 spin_lock_bh(&mvm->queue_info_lock); 753 spin_lock_bh(&mvm->queue_info_lock);
767 txq_curr_ac = mvm->queue_info[queue].mac80211_ac; 754 txq_curr_ac = mvm->queue_info[queue].mac80211_ac;
768 cmd.sta_id = mvm->queue_info[queue].ra_sta_id; 755 sta_id = mvm->queue_info[queue].ra_sta_id;
769 cmd.tx_fifo = iwl_mvm_ac_to_tx_fifo[txq_curr_ac];
770 cmd.tid = mvm->queue_info[queue].txq_tid;
771 spin_unlock_bh(&mvm->queue_info_lock); 756 spin_unlock_bh(&mvm->queue_info_lock);
772 757
758 disable_agg_tids = iwl_mvm_remove_sta_queue_marking(mvm, queue);
773 /* Disable the queue */ 759 /* Disable the queue */
774 if (disable_agg_tids) 760 if (disable_agg_tids)
775 iwl_mvm_invalidate_sta_queue(mvm, queue, 761 iwl_mvm_invalidate_sta_queue(mvm, queue,
776 disable_agg_tids, false); 762 disable_agg_tids, false);
777 iwl_trans_txq_disable(mvm->trans, queue, false); 763
778 ret = iwl_mvm_send_cmd_pdu(mvm, SCD_QUEUE_CFG, 0, sizeof(cmd), 764 ret = iwl_mvm_disable_txq(mvm, queue,
779 &cmd); 765 mvmsta->vif->hw_queue[txq_curr_ac],
766 tid, 0);
780 if (ret) { 767 if (ret) {
781 IWL_ERR(mvm, 768 IWL_ERR(mvm,
782 "Failed to free inactive queue %d (ret=%d)\n", 769 "Failed to free inactive queue %d (ret=%d)\n",
@@ -791,7 +778,7 @@ static int iwl_mvm_sta_alloc_queue(struct iwl_mvm *mvm,
791 } 778 }
792 779
793 /* If TXQ is allocated to another STA, update removal in FW */ 780 /* If TXQ is allocated to another STA, update removal in FW */
794 if (cmd.sta_id != mvmsta->sta_id) 781 if (sta_id != mvmsta->sta_id)
795 iwl_mvm_invalidate_sta_queue(mvm, queue, 0, true); 782 iwl_mvm_invalidate_sta_queue(mvm, queue, 0, true);
796 } 783 }
797 784