diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-06-02 11:56:58 +0200 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-08-01 12:41:43 +0300 |
commit | 702e975d6a60027968423a4fdaaf0831da87b73b (patch) | |
tree | 4c4c641d13053890254878f998feed92eba30bed /drivers/net/wireless/intel/iwlwifi/fw | |
parent | d0b813fcdc22d091f8c9eee3a1484dca162667c8 (diff) |
iwlwifi: track current firmware image in common code
Track the current firmware image in the common code instead
of in the opmode so that later patches can access it there
in a common way.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/runtime.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/runtime.h b/drivers/net/wireless/intel/iwlwifi/fw/runtime.h index 185902ce7e13..c483a76cb0e5 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/runtime.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/runtime.h @@ -85,6 +85,8 @@ struct iwl_fwrt_shared_mem_cfg { * @num_of_paging_blk: number of paging blocks * @num_of_pages_in_last_blk: number of pages in the last block * @smem_cfg: saved firmware SMEM configuration + * @cur_fw_img: current firmware image, must be maintained by + * the driver by calling &iwl_fw_set_current_image() */ struct iwl_fw_runtime { struct iwl_trans *trans; @@ -96,6 +98,8 @@ struct iwl_fw_runtime { u16 num_of_paging_blk; u16 num_of_pages_in_last_blk; + enum iwl_ucode_type cur_fw_img; + /* memory configuration */ struct iwl_fwrt_shared_mem_cfg smem_cfg; }; @@ -110,6 +114,12 @@ static inline void iwl_fw_runtime_init(struct iwl_fw_runtime *fwrt, fwrt->dev = trans->dev; } +static inline void iwl_fw_set_current_image(struct iwl_fw_runtime *fwrt, + enum iwl_ucode_type cur_fw_img) +{ + fwrt->cur_fw_img = cur_fw_img; +} + int iwl_init_paging(struct iwl_fw_runtime *fwrt, enum iwl_ucode_type type); void iwl_free_fw_paging(struct iwl_fw_runtime *fwrt); |