iwlwifi: rename wait_for_tx_queues_empty
authorSara Sharon <sara.sharon@intel.com>
Sun, 5 Mar 2017 09:38:58 +0000 (11:38 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 25 Apr 2017 20:04:29 +0000 (23:04 +0300)
Rename current wait_tx_queue_empty to wait_tx_queues_empty since
it waits for multiple queues (up to 32).
Next patch will add a wait for single TX queue which is needed for
gen2 to be scalable for 512.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/dvm/lib.c
drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/iwl-trans.h
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/sta.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c

index 6c2d6da7eec6d9cb62056c6a7765b1b98e9ead1f..74e52f7c5aa13afd8185ce41273b35beac9ed428 100644 (file)
@@ -180,7 +180,7 @@ void iwlagn_dev_txfifo_flush(struct iwl_priv *priv)
                goto done;
        }
        IWL_DEBUG_INFO(priv, "wait transmit/flush all frames\n");
-       iwl_trans_wait_tx_queue_empty(priv->trans, 0xffffffff);
+       iwl_trans_wait_tx_queues_empty(priv->trans, 0xffffffff);
 done:
        ieee80211_wake_queues(priv->hw);
        mutex_unlock(&priv->mutex);
index 2a04d0cd71aefc5b09022daee9e6470e924075a7..5fd307da562eebdf72605c1d4291268bd2379f53 100644 (file)
@@ -1143,7 +1143,7 @@ static void iwlagn_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
        }
 
        IWL_DEBUG_TX_QUEUES(priv, "wait transmit/flush all frames\n");
-       iwl_trans_wait_tx_queue_empty(priv->trans, scd_queues);
+       iwl_trans_wait_tx_queues_empty(priv->trans, scd_queues);
 done:
        mutex_unlock(&priv->mutex);
        IWL_DEBUG_MAC80211(priv, "leave\n");
index 181636861cb64f117982c0934b564105f4efbc8d..0ebfdbb22992c10a7375dea3cc4a9aa1783fab16 100644 (file)
@@ -691,7 +691,7 @@ struct iwl_trans_ops {
        void (*txq_set_shared_mode)(struct iwl_trans *trans, u32 txq_id,
                                    bool shared);
 
-       int (*wait_tx_queue_empty)(struct iwl_trans *trans, u32 txq_bm);
+       int (*wait_tx_queues_empty)(struct iwl_trans *trans, u32 txq_bm);
        void (*freeze_txq_timer)(struct iwl_trans *trans, unsigned long txqs,
                                 bool freeze);
        void (*block_txq_ptrs)(struct iwl_trans *trans, bool block);
@@ -1195,15 +1195,15 @@ static inline void iwl_trans_block_txq_ptrs(struct iwl_trans *trans,
                trans->ops->block_txq_ptrs(trans, block);
 }
 
-static inline int iwl_trans_wait_tx_queue_empty(struct iwl_trans *trans,
-                                               u32 txqs)
+static inline int iwl_trans_wait_tx_queues_empty(struct iwl_trans *trans,
+                                                u32 txqs)
 {
        if (WARN_ON_ONCE(trans->state != IWL_TRANS_FW_ALIVE)) {
                IWL_ERR(trans, "%s bad state = %d\n", __func__, trans->state);
                return -EIO;
        }
 
-       return trans->ops->wait_tx_queue_empty(trans, txqs);
+       return trans->ops->wait_tx_queues_empty(trans, txqs);
 }
 
 static inline void iwl_trans_write8(struct iwl_trans *trans, u32 ofs, u8 val)
index c121982d781e672084524d90cbce2c572827344c..d91b28c3ea5e314b486f615c7145e5522f968412 100644 (file)
@@ -1478,7 +1478,7 @@ static void iwl_mvm_prepare_mac_removal(struct iwl_mvm *mvm,
                 * already marked as draining, so to complete the draining, we
                 * just need to wait until the transport is empty.
                 */
-               iwl_trans_wait_tx_queue_empty(mvm->trans, tfd_msk);
+               iwl_trans_wait_tx_queues_empty(mvm->trans, tfd_msk);
        }
 
        if (vif->type == NL80211_IFTYPE_P2P_DEVICE) {
@@ -4000,7 +4000,7 @@ static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
                /* this can take a while, and we may need/want other operations
                 * to succeed while doing this, so do it without the mutex held
                 */
-               iwl_trans_wait_tx_queue_empty(mvm->trans, msk);
+               iwl_trans_wait_tx_queues_empty(mvm->trans, msk);
        }
 }
 
index d06ba5cb7297aedc51cc736b058676777f843000..f5c786ddc52631087b56067807bb4d48e0869664 100644 (file)
@@ -658,7 +658,7 @@ int iwl_mvm_scd_queue_redirect(struct iwl_mvm *mvm, int queue, int tid,
 
        /* Stop MAC queues and wait for this queue to empty */
        iwl_mvm_stop_mac_queues(mvm, mq);
-       ret = iwl_trans_wait_tx_queue_empty(mvm->trans, BIT(queue));
+       ret = iwl_trans_wait_tx_queues_empty(mvm->trans, BIT(queue));
        if (ret) {
                IWL_ERR(mvm, "Error draining queue %d before reconfig\n",
                        queue);
@@ -1614,8 +1614,8 @@ int iwl_mvm_rm_sta(struct iwl_mvm *mvm,
                ret = iwl_mvm_flush_tx_path(mvm, mvm_sta->tfd_queue_msk, 0);
                if (ret)
                        return ret;
-               ret = iwl_trans_wait_tx_queue_empty(mvm->trans,
-                                                   mvm_sta->tfd_queue_msk);
+               ret = iwl_trans_wait_tx_queues_empty(mvm->trans,
+                                                    mvm_sta->tfd_queue_msk);
                if (ret)
                        return ret;
                ret = iwl_mvm_drain_sta(mvm, mvm_sta, false);
@@ -2659,8 +2659,8 @@ int iwl_mvm_sta_tx_agg_oper(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                         * If reconfiguring an existing queue, it first must be
                         * drained
                         */
-                       ret = iwl_trans_wait_tx_queue_empty(mvm->trans,
-                                                           BIT(queue));
+                       ret = iwl_trans_wait_tx_queues_empty(mvm->trans,
+                                                            BIT(queue));
                        if (ret) {
                                IWL_ERR(mvm,
                                        "Error draining queue before reconfig\n");
@@ -2846,8 +2846,8 @@ int iwl_mvm_sta_tx_agg_flush(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                iwl_mvm_drain_sta(mvm, mvmsta, true);
                if (iwl_mvm_flush_tx_path(mvm, BIT(txq_id), 0))
                        IWL_ERR(mvm, "Couldn't flush the AGG queue\n");
-               iwl_trans_wait_tx_queue_empty(mvm->trans,
-                                             mvmsta->tfd_queue_msk);
+               iwl_trans_wait_tx_queues_empty(mvm->trans,
+                                              mvmsta->tfd_queue_msk);
                iwl_mvm_drain_sta(mvm, mvmsta, false);
 
                iwl_mvm_sta_tx_agg(mvm, sta, tid, txq_id, false);
index c551ba8809dbd7ce0ec605f20e122fccde90735e..70acf850a9f19f9750296ae2019d8f4a8c277b67 100644 (file)
@@ -2833,7 +2833,7 @@ static void iwl_trans_pcie_resume(struct iwl_trans *trans)
        .ref = iwl_trans_pcie_ref,                                      \
        .unref = iwl_trans_pcie_unref,                                  \
        .dump_data = iwl_trans_pcie_dump_data,                          \
-       .wait_tx_queue_empty = iwl_trans_pcie_wait_txq_empty,           \
+       .wait_tx_queues_empty = iwl_trans_pcie_wait_txq_empty,          \
        .d3_suspend = iwl_trans_pcie_d3_suspend,                        \
        .d3_resume = iwl_trans_pcie_d3_resume