diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-04-16 11:29:24 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-04-22 13:21:18 -0400 |
commit | dbf28e21ca391110e90ccad05dda79d2e2f60e0e (patch) | |
tree | 76aa45ec1cfb00c09b9cae51742c475ab821911a /drivers/net/wireless/iwlwifi/iwl-dev.h | |
parent | ca7966c88e44233fac113579071a6f55e00ef5ac (diff) |
iwlagn: combine firmware code/data
On new hardware, ucode images always come in
pairs: code and data. Therefore, combine the
variables into an appropriate struct and use
that when both code and data are needed.
Also, combine allocation and copying so that
we have less code in total.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-dev.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 414968c6b7cf..857eb0e9e397 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -479,6 +479,10 @@ struct fw_desc { | |||
479 | u32 len; /* bytes */ | 479 | u32 len; /* bytes */ |
480 | }; | 480 | }; |
481 | 481 | ||
482 | struct fw_img { | ||
483 | struct fw_desc code, data; | ||
484 | }; | ||
485 | |||
482 | /* v1/v2 uCode file layout */ | 486 | /* v1/v2 uCode file layout */ |
483 | struct iwl_ucode_header { | 487 | struct iwl_ucode_header { |
484 | __le32 ver; /* major/minor/API/serial */ | 488 | __le32 ver; /* major/minor/API/serial */ |
@@ -1266,10 +1270,9 @@ struct iwl_priv { | |||
1266 | int fw_index; /* firmware we're trying to load */ | 1270 | int fw_index; /* firmware we're trying to load */ |
1267 | u32 ucode_ver; /* version of ucode, copy of | 1271 | u32 ucode_ver; /* version of ucode, copy of |
1268 | iwl_ucode.ver */ | 1272 | iwl_ucode.ver */ |
1269 | struct fw_desc ucode_code; /* runtime inst */ | 1273 | struct fw_img ucode_rt; |
1270 | struct fw_desc ucode_data; /* runtime data original */ | 1274 | struct fw_img ucode_init; |
1271 | struct fw_desc ucode_init; /* initialization inst */ | 1275 | |
1272 | struct fw_desc ucode_init_data; /* initialization data */ | ||
1273 | enum iwlagn_ucode_subtype ucode_type; | 1276 | enum iwlagn_ucode_subtype ucode_type; |
1274 | u8 ucode_write_complete; /* the image write is complete */ | 1277 | u8 ucode_write_complete; /* the image write is complete */ |
1275 | char firmware_name[25]; | 1278 | char firmware_name[25]; |