diff options
author | Lilach Edelstein <lilach.edelstein@intel.com> | 2013-01-13 13:31:10 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-01 11:27:22 +0100 |
commit | e139dc4aebf52a9c88552963b9794fd1dff036f1 (patch) | |
tree | 4ade4541db26cf923a911efb551ded4e5ecb8748 /drivers/net/wireless/iwlwifi/iwl-trans.h | |
parent | 6690c01d168ecc620139dbd9df8affc2ac8e0683 (diff) |
iwlwifi: add iwl_set_bits_mask to transport API
Express iwl_set_bit() and iwl_clear_bit() through iwl_set_bits_mask()
and add the latter to the transport's API in order to allow different
implementation for different transport types in the future.
Signed-off-by: Lilach Edelstein <lilach.edelstein@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.h | 9 |
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 d4ab24b9d2b..c2b7e856a72 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h @@ -418,6 +418,7 @@ struct iwl_trans; * @set_pmi: set the power pmi state * @grab_nic_access: wake the NIC to be able to access non-HBUS regs * @release_nic_access: let the NIC go to sleep + * @set_bits_mask - set SRAM register according to value and mask. */ struct iwl_trans_ops { @@ -462,6 +463,8 @@ struct iwl_trans_ops { void (*set_pmi)(struct iwl_trans *trans, bool state); bool (*grab_nic_access)(struct iwl_trans *trans, bool silent); void (*release_nic_access)(struct iwl_trans *trans); + void (*set_bits_mask)(struct iwl_trans *trans, u32 reg, u32 mask, + u32 value); }; /** @@ -762,6 +765,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_set_bits_mask(struct iwl_trans *trans, u32 reg, u32 mask, u32 value) +{ + trans->ops->set_bits_mask(trans, reg, mask, value); +} + #define iwl_trans_grab_nic_access(trans, silent) \ __cond_lock(nic_access, \ likely((trans)->ops->grab_nic_access(trans, silent))) |