diff options
author | Sara Sharon <sara.sharon@intel.com> | 2018-06-12 09:41:35 +0200 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2018-10-06 09:25:44 +0200 |
commit | 6c042d7505d082b3bda0909c8a2c9817aa210ea2 (patch) | |
tree | 2f3548dcbaef969672b46810c90137cb0ccf33ad /drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |
parent | iwlwifi: dbg: dump memory in a helper function (diff) | |
download | linux-6c042d7505d082b3bda0909c8a2c9817aa210ea2.tar.xz linux-6c042d7505d082b3bda0909c8a2c9817aa210ea2.zip |
iwlwifi: dbg: group trigger condition to helper function
The triplet of get trigger, is trigger enabled and is trigger stopped
repeats itself. Group them in a function to avoid code duplication.
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/ops.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 5f2f599a7ccd..2f611bf83d56 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c @@ -953,15 +953,13 @@ static inline void iwl_mvm_rx_check_trigger(struct iwl_mvm *mvm, struct iwl_fw_dbg_trigger_cmd *cmds_trig; int i; - if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_FW_NOTIF)) + trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, NULL, + FW_DBG_TRIGGER_FW_NOTIF); + if (!trig) return; - trig = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_FW_NOTIF); cmds_trig = (void *)trig->data; - if (!iwl_fw_dbg_trigger_check_stop(&mvm->fwrt, NULL, trig)) - return; - for (i = 0; i < ARRAY_SIZE(cmds_trig->cmds); i++) { /* don't collect on CMD 0 */ if (!cmds_trig->cmds[i].cmd_id) |