diff options
author | David Spinadel <david.spinadel@intel.com> | 2012-03-10 16:00:14 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-12 14:22:09 -0400 |
commit | 6dfa8d019cd21d08634ceb65a3fb90d0648bd93b (patch) | |
tree | 04cb6b0be027598b782d8c91ab5ae681d3304d83 /drivers/net/wireless/iwlwifi/iwl-fw.h | |
parent | ed8c8365c4431eeb733def3dd314cf303e1b12ea (diff) |
iwlwifi: change struct iwl_fw
Change iwl_fw struct to hold an array of fw_img instead of
three separated instances.
Change fw_img to hold an array of fw_desc instead of two
separate descriptors for instructions and data.
Change load_given_ucode, load_section, verification functions
etc. to support this structure.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-fw.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-fw.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-fw.h b/drivers/net/wireless/iwlwifi/iwl-fw.h index c99a7fd1d29a..5d634f3db929 100644 --- a/drivers/net/wireless/iwlwifi/iwl-fw.h +++ b/drivers/net/wireless/iwlwifi/iwl-fw.h | |||
@@ -101,6 +101,20 @@ enum iwl_ucode_type { | |||
101 | IWL_UCODE_TYPE_MAX, | 101 | IWL_UCODE_TYPE_MAX, |
102 | }; | 102 | }; |
103 | 103 | ||
104 | /* | ||
105 | * enumeration of ucode section. | ||
106 | * This enumeration is used for legacy tlv style (before 16.0 uCode). | ||
107 | */ | ||
108 | enum iwl_ucode_sec { | ||
109 | IWL_UCODE_SECTION_INST, | ||
110 | IWL_UCODE_SECTION_DATA, | ||
111 | }; | ||
112 | /* | ||
113 | * For 16.0 uCode and above, there is no differentiation between sections, | ||
114 | * just an offset to the HW address. | ||
115 | */ | ||
116 | #define IWL_UCODE_SECTION_MAX 4 | ||
117 | |||
104 | struct iwl_ucode_capabilities { | 118 | struct iwl_ucode_capabilities { |
105 | u32 max_probe_length; | 119 | u32 max_probe_length; |
106 | u32 standard_phy_calibration_size; | 120 | u32 standard_phy_calibration_size; |
@@ -116,8 +130,7 @@ struct fw_desc { | |||
116 | }; | 130 | }; |
117 | 131 | ||
118 | struct fw_img { | 132 | struct fw_img { |
119 | struct fw_desc code; /* firmware code image */ | 133 | struct fw_desc sec[IWL_UCODE_SECTION_MAX]; |
120 | struct fw_desc data; /* firmware data image */ | ||
121 | }; | 134 | }; |
122 | 135 | ||
123 | /* uCode version contains 4 values: Major/Minor/API/Serial */ | 136 | /* uCode version contains 4 values: Major/Minor/API/Serial */ |
@@ -131,9 +144,7 @@ struct fw_img { | |||
131 | * | 144 | * |
132 | * @ucode_ver: ucode version from the ucode file | 145 | * @ucode_ver: ucode version from the ucode file |
133 | * @fw_version: firmware version string | 146 | * @fw_version: firmware version string |
134 | * @ucode_rt: run time ucode image | 147 | * @img: ucode image like ucode_rt, ucode_init, ucode_wowlan. |
135 | * @ucode_init: init ucode image | ||
136 | * @ucode_wowlan: wake on wireless ucode image (optional) | ||
137 | * @ucode_capa: capabilities parsed from the ucode file. | 148 | * @ucode_capa: capabilities parsed from the ucode file. |
138 | * @enhance_sensitivity_table: device can do enhanced sensitivity. | 149 | * @enhance_sensitivity_table: device can do enhanced sensitivity. |
139 | * @init_evtlog_ptr: event log offset for init ucode. | 150 | * @init_evtlog_ptr: event log offset for init ucode. |
@@ -149,9 +160,7 @@ struct iwl_fw { | |||
149 | char fw_version[ETHTOOL_BUSINFO_LEN]; | 160 | char fw_version[ETHTOOL_BUSINFO_LEN]; |
150 | 161 | ||
151 | /* ucode images */ | 162 | /* ucode images */ |
152 | struct fw_img ucode_rt; | 163 | struct fw_img img[IWL_UCODE_TYPE_MAX]; |
153 | struct fw_img ucode_init; | ||
154 | struct fw_img ucode_wowlan; | ||
155 | 164 | ||
156 | struct iwl_ucode_capabilities ucode_capa; | 165 | struct iwl_ucode_capabilities ucode_capa; |
157 | bool enhance_sensitivity_table; | 166 | bool enhance_sensitivity_table; |