diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h index e378ea6dca9c..b76532e238c1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h | |||
@@ -385,6 +385,8 @@ struct iwl_trans; | |||
385 | * @write8: write a u8 to a register at offset ofs from the BAR | 385 | * @write8: write a u8 to a register at offset ofs from the BAR |
386 | * @write32: write a u32 to a register at offset ofs from the BAR | 386 | * @write32: write a u32 to a register at offset ofs from the BAR |
387 | * @read32: read a u32 register at offset ofs from the BAR | 387 | * @read32: read a u32 register at offset ofs from the BAR |
388 | * @read_prph: read a DWORD from a periphery register | ||
389 | * @write_prph: write a DWORD to a periphery register | ||
388 | * @configure: configure parameters required by the transport layer from | 390 | * @configure: configure parameters required by the transport layer from |
389 | * the op_mode. May be called several times before start_fw, can't be | 391 | * the op_mode. May be called several times before start_fw, can't be |
390 | * called after that. | 392 | * called after that. |
@@ -420,6 +422,8 @@ struct iwl_trans_ops { | |||
420 | void (*write8)(struct iwl_trans *trans, u32 ofs, u8 val); | 422 | void (*write8)(struct iwl_trans *trans, u32 ofs, u8 val); |
421 | void (*write32)(struct iwl_trans *trans, u32 ofs, u32 val); | 423 | void (*write32)(struct iwl_trans *trans, u32 ofs, u32 val); |
422 | u32 (*read32)(struct iwl_trans *trans, u32 ofs); | 424 | u32 (*read32)(struct iwl_trans *trans, u32 ofs); |
425 | u32 (*read_prph)(struct iwl_trans *trans, u32 ofs); | ||
426 | void (*write_prph)(struct iwl_trans *trans, u32 ofs, u32 val); | ||
423 | void (*configure)(struct iwl_trans *trans, | 427 | void (*configure)(struct iwl_trans *trans, |
424 | const struct iwl_trans_config *trans_cfg); | 428 | const struct iwl_trans_config *trans_cfg); |
425 | void (*set_pmi)(struct iwl_trans *trans, bool state); | 429 | void (*set_pmi)(struct iwl_trans *trans, bool state); |
@@ -489,10 +493,6 @@ struct iwl_trans { | |||
489 | static inline void iwl_trans_configure(struct iwl_trans *trans, | 493 | static inline void iwl_trans_configure(struct iwl_trans *trans, |
490 | const struct iwl_trans_config *trans_cfg) | 494 | const struct iwl_trans_config *trans_cfg) |
491 | { | 495 | { |
492 | /* | ||
493 | * only set the op_mode for the moment. Later on, this function will do | ||
494 | * more | ||
495 | */ | ||
496 | trans->op_mode = trans_cfg->op_mode; | 496 | trans->op_mode = trans_cfg->op_mode; |
497 | 497 | ||
498 | trans->ops->configure(trans, trans_cfg); | 498 | trans->ops->configure(trans, trans_cfg); |
@@ -512,6 +512,9 @@ static inline void iwl_trans_stop_hw(struct iwl_trans *trans, | |||
512 | 512 | ||
513 | trans->ops->stop_hw(trans, op_mode_leaving); | 513 | trans->ops->stop_hw(trans, op_mode_leaving); |
514 | 514 | ||
515 | if (op_mode_leaving) | ||
516 | trans->op_mode = NULL; | ||
517 | |||
515 | trans->state = IWL_TRANS_NO_FW; | 518 | trans->state = IWL_TRANS_NO_FW; |
516 | } | 519 | } |
517 | 520 | ||
@@ -665,6 +668,17 @@ static inline u32 iwl_trans_read32(struct iwl_trans *trans, u32 ofs) | |||
665 | return trans->ops->read32(trans, ofs); | 668 | return trans->ops->read32(trans, ofs); |
666 | } | 669 | } |
667 | 670 | ||
671 | static inline u32 iwl_trans_read_prph(struct iwl_trans *trans, u32 ofs) | ||
672 | { | ||
673 | return trans->ops->read_prph(trans, ofs); | ||
674 | } | ||
675 | |||
676 | static inline void iwl_trans_write_prph(struct iwl_trans *trans, u32 ofs, | ||
677 | u32 val) | ||
678 | { | ||
679 | return trans->ops->write_prph(trans, ofs, val); | ||
680 | } | ||
681 | |||
668 | static inline void iwl_trans_set_pmi(struct iwl_trans *trans, bool state) | 682 | static inline void iwl_trans_set_pmi(struct iwl_trans *trans, bool state) |
669 | { | 683 | { |
670 | trans->ops->set_pmi(trans, state); | 684 | trans->ops->set_pmi(trans, state); |