iwlwifi: mvm: don't stop the FW monitor too early
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 13 Apr 2015 09:05:48 +0000 (12:05 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 19 Apr 2015 14:06:56 +0000 (17:06 +0300)
When the delay paramatere is provided, we need to stop
the collection only after the delay has elapsed.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/fw.c
drivers/net/wireless/iwlwifi/mvm/ops.c

index bc5eac4960e18a79a211da2a2bf6492b1a39e570..9c28fe72fd7428fc2db7eb142e3745513854cc47 100644 (file)
@@ -494,15 +494,6 @@ int iwl_mvm_fw_dbg_collect_desc(struct iwl_mvm *mvm,
 
        mvm->fw_dump_desc = desc;
 
-       /* stop recording */
-       if (mvm->cfg->device_family == IWL_DEVICE_FAMILY_7000) {
-               iwl_set_bits_prph(mvm->trans, MON_BUFF_SAMPLE_CTL, 0x100);
-       } else {
-               iwl_write_prph(mvm->trans, DBGC_IN_SAMPLE, 0);
-               /* wait before we collect the data till the DBGC stop */
-               udelay(100);
-       }
-
        queue_delayed_work(system_wq, &mvm->fw_dump_wk, delay);
 
        return 0;
index a08b03d58d4bf0f3ebd4773a7fdb6e07cc8406b8..1c66297d82c0a80dd0bb66c7148ea8ef42c5e099 100644 (file)
@@ -865,6 +865,16 @@ static void iwl_mvm_fw_error_dump_wk(struct work_struct *work)
                return;
 
        mutex_lock(&mvm->mutex);
+
+       /* stop recording */
+       if (mvm->cfg->device_family == IWL_DEVICE_FAMILY_7000) {
+               iwl_set_bits_prph(mvm->trans, MON_BUFF_SAMPLE_CTL, 0x100);
+       } else {
+               iwl_write_prph(mvm->trans, DBGC_IN_SAMPLE, 0);
+               /* wait before we collect the data till the DBGC stop */
+               udelay(100);
+       }
+
        iwl_mvm_fw_error_dump(mvm);
 
        /* start recording again if the firmware is not crashed */