aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2015-10-06 02:54:57 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-10-25 07:45:04 -0400
commit5888a40c50b181bab6737167cfc1bf653945e2a1 (patch)
treeaebe1ef0b7ee8d4ca67b9d69b6d9896401f07574
parentc84af35de612fb45db6b5c5968b575813f5daa3b (diff)
iwlwifi: mvm: let any command flag be passed to iwl_mvm_flushtx_path()
Instead of only allowing the caller to decide whether the CMD_ASYNC flag is set, let it pass the entire flags bitmask. This allows more flexibility and will be needed when we call this function in the suspend flow (where other flags are needed). Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/debugfs.c2
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c4
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mvm.h2
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/sta.c4
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/time-event.c2
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/tx.c4
6 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
index 9b4fbb8b483a..05928fb4021d 100644
--- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
@@ -85,7 +85,7 @@ static ssize_t iwl_dbgfs_tx_flush_write(struct iwl_mvm *mvm, char *buf,
85 IWL_ERR(mvm, "FLUSHING queues: scd_q_msk = 0x%x\n", scd_q_msk); 85 IWL_ERR(mvm, "FLUSHING queues: scd_q_msk = 0x%x\n", scd_q_msk);
86 86
87 mutex_lock(&mvm->mutex); 87 mutex_lock(&mvm->mutex);
88 ret = iwl_mvm_flush_tx_path(mvm, scd_q_msk, true) ? : count; 88 ret = iwl_mvm_flush_tx_path(mvm, scd_q_msk, 0) ? : count;
89 mutex_unlock(&mvm->mutex); 89 mutex_unlock(&mvm->mutex);
90 90
91 return ret; 91 return ret;
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index aaffb54e8f78..adfcce48d863 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -1781,7 +1781,7 @@ static void iwl_mvm_prepare_mac_removal(struct iwl_mvm *mvm,
1781 * Flush them here. 1781 * Flush them here.
1782 */ 1782 */
1783 mutex_lock(&mvm->mutex); 1783 mutex_lock(&mvm->mutex);
1784 iwl_mvm_flush_tx_path(mvm, tfd_msk, true); 1784 iwl_mvm_flush_tx_path(mvm, tfd_msk, 0);
1785 mutex_unlock(&mvm->mutex); 1785 mutex_unlock(&mvm->mutex);
1786 1786
1787 /* 1787 /*
@@ -3924,7 +3924,7 @@ static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
3924 } 3924 }
3925 3925
3926 if (drop) { 3926 if (drop) {
3927 if (iwl_mvm_flush_tx_path(mvm, msk, true)) 3927 if (iwl_mvm_flush_tx_path(mvm, msk, 0))
3928 IWL_ERR(mvm, "flush request fail\n"); 3928 IWL_ERR(mvm, "flush request fail\n");
3929 mutex_unlock(&mvm->mutex); 3929 mutex_unlock(&mvm->mutex);
3930 } else { 3930 } else {
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h
index 0d3aff1b4bad..4485bdb56b34 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
@@ -1031,7 +1031,7 @@ const char *iwl_mvm_get_tx_fail_reason(u32 status);
1031#else 1031#else
1032static inline const char *iwl_mvm_get_tx_fail_reason(u32 status) { return ""; } 1032static inline const char *iwl_mvm_get_tx_fail_reason(u32 status) { return ""; }
1033#endif 1033#endif
1034int iwl_mvm_flush_tx_path(struct iwl_mvm *mvm, u32 tfd_msk, bool sync); 1034int iwl_mvm_flush_tx_path(struct iwl_mvm *mvm, u32 tfd_msk, u32 flags);
1035void iwl_mvm_async_handlers_purge(struct iwl_mvm *mvm); 1035void iwl_mvm_async_handlers_purge(struct iwl_mvm *mvm);
1036 1036
1037static inline void iwl_mvm_set_tx_cmd_ccmp(struct ieee80211_tx_info *info, 1037static inline void iwl_mvm_set_tx_cmd_ccmp(struct ieee80211_tx_info *info,
diff --git a/drivers/net/wireless/iwlwifi/mvm/sta.c b/drivers/net/wireless/iwlwifi/mvm/sta.c
index a9a3eb6a1f8a..04d0cb3b69a1 100644
--- a/drivers/net/wireless/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/iwlwifi/mvm/sta.c
@@ -501,7 +501,7 @@ int iwl_mvm_rm_sta(struct iwl_mvm *mvm,
501 if (ret) 501 if (ret)
502 return ret; 502 return ret;
503 /* flush its queues here since we are freeing mvm_sta */ 503 /* flush its queues here since we are freeing mvm_sta */
504 ret = iwl_mvm_flush_tx_path(mvm, mvm_sta->tfd_queue_msk, true); 504 ret = iwl_mvm_flush_tx_path(mvm, mvm_sta->tfd_queue_msk, 0);
505 if (ret) 505 if (ret)
506 return ret; 506 return ret;
507 ret = iwl_trans_wait_tx_queue_empty(mvm->trans, 507 ret = iwl_trans_wait_tx_queue_empty(mvm->trans,
@@ -1155,7 +1155,7 @@ int iwl_mvm_sta_tx_agg_flush(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
1155 1155
1156 if (old_state >= IWL_AGG_ON) { 1156 if (old_state >= IWL_AGG_ON) {
1157 iwl_mvm_drain_sta(mvm, mvmsta, true); 1157 iwl_mvm_drain_sta(mvm, mvmsta, true);
1158 if (iwl_mvm_flush_tx_path(mvm, BIT(txq_id), true)) 1158 if (iwl_mvm_flush_tx_path(mvm, BIT(txq_id), 0))
1159 IWL_ERR(mvm, "Couldn't flush the AGG queue\n"); 1159 IWL_ERR(mvm, "Couldn't flush the AGG queue\n");
1160 iwl_trans_wait_tx_queue_empty(mvm->trans, 1160 iwl_trans_wait_tx_queue_empty(mvm->trans,
1161 mvmsta->tfd_queue_msk); 1161 mvmsta->tfd_queue_msk);
diff --git a/drivers/net/wireless/iwlwifi/mvm/time-event.c b/drivers/net/wireless/iwlwifi/mvm/time-event.c
index dbd7d544575d..7530eb23035d 100644
--- a/drivers/net/wireless/iwlwifi/mvm/time-event.c
+++ b/drivers/net/wireless/iwlwifi/mvm/time-event.c
@@ -129,7 +129,7 @@ void iwl_mvm_roc_done_wk(struct work_struct *wk)
129 * issue as it will have to complete before the next command is 129 * issue as it will have to complete before the next command is
130 * executed, and a new time event means a new command. 130 * executed, and a new time event means a new command.
131 */ 131 */
132 iwl_mvm_flush_tx_path(mvm, queues, false); 132 iwl_mvm_flush_tx_path(mvm, queues, CMD_ASYNC);
133} 133}
134 134
135static void iwl_mvm_roc_finished(struct iwl_mvm *mvm) 135static void iwl_mvm_roc_finished(struct iwl_mvm *mvm)
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
index ff8b9bdef7e8..c652a66be803 100644
--- a/drivers/net/wireless/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
@@ -1099,7 +1099,7 @@ out:
1099 * 2) flush the Tx path 1099 * 2) flush the Tx path
1100 * 3) wait for the transport queues to be empty 1100 * 3) wait for the transport queues to be empty
1101 */ 1101 */
1102int iwl_mvm_flush_tx_path(struct iwl_mvm *mvm, u32 tfd_msk, bool sync) 1102int iwl_mvm_flush_tx_path(struct iwl_mvm *mvm, u32 tfd_msk, u32 flags)
1103{ 1103{
1104 int ret; 1104 int ret;
1105 struct iwl_tx_path_flush_cmd flush_cmd = { 1105 struct iwl_tx_path_flush_cmd flush_cmd = {
@@ -1107,8 +1107,6 @@ int iwl_mvm_flush_tx_path(struct iwl_mvm *mvm, u32 tfd_msk, bool sync)
1107 .flush_ctl = cpu_to_le16(DUMP_TX_FIFO_FLUSH), 1107 .flush_ctl = cpu_to_le16(DUMP_TX_FIFO_FLUSH),
1108 }; 1108 };
1109 1109
1110 u32 flags = sync ? 0 : CMD_ASYNC;
1111
1112 ret = iwl_mvm_send_cmd_pdu(mvm, TXPATH_FLUSH, flags, 1110 ret = iwl_mvm_send_cmd_pdu(mvm, TXPATH_FLUSH, flags,
1113 sizeof(flush_cmd), &flush_cmd); 1111 sizeof(flush_cmd), &flush_cmd);
1114 if (ret) 1112 if (ret)