aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-trans.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index d4ab24b9d2b4..c2b7e856a726 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -418,6 +418,7 @@ struct iwl_trans;
418 * @set_pmi: set the power pmi state 418 * @set_pmi: set the power pmi state
419 * @grab_nic_access: wake the NIC to be able to access non-HBUS regs 419 * @grab_nic_access: wake the NIC to be able to access non-HBUS regs
420 * @release_nic_access: let the NIC go to sleep 420 * @release_nic_access: let the NIC go to sleep
421 * @set_bits_mask - set SRAM register according to value and mask.
421 */ 422 */
422struct iwl_trans_ops { 423struct iwl_trans_ops {
423 424
@@ -462,6 +463,8 @@ struct iwl_trans_ops {
462 void (*set_pmi)(struct iwl_trans *trans, bool state); 463 void (*set_pmi)(struct iwl_trans *trans, bool state);
463 bool (*grab_nic_access)(struct iwl_trans *trans, bool silent); 464 bool (*grab_nic_access)(struct iwl_trans *trans, bool silent);
464 void (*release_nic_access)(struct iwl_trans *trans); 465 void (*release_nic_access)(struct iwl_trans *trans);
466 void (*set_bits_mask)(struct iwl_trans *trans, u32 reg, u32 mask,
467 u32 value);
465}; 468};
466 469
467/** 470/**
@@ -762,6 +765,12 @@ static inline void iwl_trans_set_pmi(struct iwl_trans *trans, bool state)
762 trans->ops->set_pmi(trans, state); 765 trans->ops->set_pmi(trans, state);
763} 766}
764 767
768static inline void
769iwl_trans_set_bits_mask(struct iwl_trans *trans, u32 reg, u32 mask, u32 value)
770{
771 trans->ops->set_bits_mask(trans, reg, mask, value);
772}
773
765#define iwl_trans_grab_nic_access(trans, silent) \ 774#define iwl_trans_grab_nic_access(trans, silent) \
766 __cond_lock(nic_access, \ 775 __cond_lock(nic_access, \
767 likely((trans)->ops->grab_nic_access(trans, silent))) 776 likely((trans)->ops->grab_nic_access(trans, silent)))