iwlwifi: mvm: remove superfluous flush_work()
authorJohannes Berg <johannes.berg@intel.com>
Wed, 15 Nov 2017 09:16:47 +0000 (10:16 +0100)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 28 Nov 2017 14:39:57 +0000 (16:39 +0200)
Since iwl_mvm_start_p2p_roc() is only called from iwl_mvm_roc(),
which already flushes the same work item, doing it again in it
is superfluous. Remove it and move the comment to the first one.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/time-event.c

index 149d301e5e98b747189896adf1db219f44131c52..e0226d2315bb08b2e8517120058de4a94efb82c1 100644 (file)
@@ -3192,6 +3192,10 @@ static int iwl_mvm_roc(struct ieee80211_hw *hw,
        IWL_DEBUG_MAC80211(mvm, "enter (%d, %d, %d)\n", channel->hw_value,
                           duration, type);
 
+       /*
+        * Flush the done work, just in case it's still pending, so that
+        * the work it does can complete and we can accept new frames.
+        */
        flush_work(&mvm->roc_done_wk);
 
        mutex_lock(&mvm->mutex);
index 4d0314912e94794b7728af17707618cd72ad2908..d3b8cb1e20b645597d725dc3cd414098e81d9f0e 100644 (file)
@@ -759,12 +759,6 @@ int iwl_mvm_start_p2p_roc(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                return -EBUSY;
        }
 
-       /*
-        * Flush the done work, just in case it's still pending, so that
-        * the work it does can complete and we can accept new frames.
-        */
-       flush_work(&mvm->roc_done_wk);
-
        time_cmd.action = cpu_to_le32(FW_CTXT_ACTION_ADD);
        time_cmd.id_and_color =
                cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id, mvmvif->color));