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.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index 9a8076194868..0a3727dac6ac 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -158,6 +158,9 @@ struct iwl_host_cmd {
158 * automatically deleted. 158 * automatically deleted.
159 * @suspend: stop the device unless WoWLAN is configured 159 * @suspend: stop the device unless WoWLAN is configured
160 * @resume: resume activity of the device 160 * @resume: resume activity of the device
161 * @write8: write a u8 to a register at offset ofs from the BAR
162 * @write32: write a u32 to a register at offset ofs from the BAR
163 * @read32: read a u32 register at offset ofs from the BAR
161 */ 164 */
162struct iwl_trans_ops { 165struct iwl_trans_ops {
163 166
@@ -201,6 +204,9 @@ struct iwl_trans_ops {
201 int (*suspend)(struct iwl_trans *trans); 204 int (*suspend)(struct iwl_trans *trans);
202 int (*resume)(struct iwl_trans *trans); 205 int (*resume)(struct iwl_trans *trans);
203#endif 206#endif
207 void (*write8)(struct iwl_trans *trans, u32 ofs, u8 val);
208 void (*write32)(struct iwl_trans *trans, u32 ofs, u32 val);
209 u32 (*read32)(struct iwl_trans *trans, u32 ofs);
204}; 210};
205 211
206/* one for each uCode image (inst/data, boot/init/runtime) */ 212/* one for each uCode image (inst/data, boot/init/runtime) */
@@ -382,6 +388,21 @@ static inline int iwl_trans_resume(struct iwl_trans *trans)
382} 388}
383#endif 389#endif
384 390
391static inline void iwl_trans_write8(struct iwl_trans *trans, u32 ofs, u8 val)
392{
393 trans->ops->write8(trans, ofs, val);
394}
395
396static inline void iwl_trans_write32(struct iwl_trans *trans, u32 ofs, u32 val)
397{
398 trans->ops->write32(trans, ofs, val);
399}
400
401static inline u32 iwl_trans_read32(struct iwl_trans *trans, u32 ofs)
402{
403 return trans->ops->read32(trans, ofs);
404}
405
385/***************************************************** 406/*****************************************************
386* Utils functions 407* Utils functions
387******************************************************/ 408******************************************************/