diff options
author | Golan Ben Ami <golan.ben.ami@intel.com> | 2017-10-25 17:02:59 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-12-20 19:28:24 +0300 |
commit | 870c2a1123b8b63be54f4c512e5d12dabec66b95 (patch) | |
tree | 378bdc59f957dfeaac4ab419dbc7ea24be594efd /drivers/net/wireless/intel/iwlwifi/iwl-trans.h | |
parent | fd527eb5d2293667bfe9d9bae8eecb2967ce32f8 (diff) | |
download | linux-870c2a1123b8b63be54f4c512e5d12dabec66b95.tar.xz |
iwlwifi: avoid duplicate sw reset executions in the code
Most of the sw resets in the code are done by one function,
which writes to the relevant CSR.
Use the common function to perform the only reset which was
done separately, redundant to the common code.
Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/iwl-trans.h')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h index af50d78cc193..c25ed1a0bbb0 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h @@ -579,6 +579,7 @@ struct iwl_trans_ops { void (*configure)(struct iwl_trans *trans, const struct iwl_trans_config *trans_cfg); void (*set_pmi)(struct iwl_trans *trans, bool state); + void (*sw_reset)(struct iwl_trans *trans); bool (*grab_nic_access)(struct iwl_trans *trans, unsigned long *flags); void (*release_nic_access)(struct iwl_trans *trans, unsigned long *flags); @@ -1124,6 +1125,12 @@ static inline void iwl_trans_set_pmi(struct iwl_trans *trans, bool state) trans->ops->set_pmi(trans, state); } +static inline void iwl_trans_sw_reset(struct iwl_trans *trans) +{ + if (trans->ops->sw_reset) + trans->ops->sw_reset(trans); +} + static inline void iwl_trans_set_bits_mask(struct iwl_trans *trans, u32 reg, u32 mask, u32 value) { |