aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-dev.h
diff options
context:
space:
mode:
authorJay Sternberg <jay.e.sternberg@intel.com>2009-07-17 12:30:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 15:05:24 -0400
commitcc0f555d511a5fe9d4519334c8f674a1dbab9e3a (patch)
tree33308c826deaf26796112df7ffb983b67146bb7f /drivers/net/wireless/iwlwifi/iwl-dev.h
parent244294e83f7637e31bbf64060301904860a32051 (diff)
iwlwifi: Handle new firmware file with ucode build number in header
Adding new API version to account for change to ucode file format. New header includes the build number of the ucode. This build number is the SVN revision thus allowing for exact correlation to the code that generated it. The header adds the build number so that older ucode images can also be enhanced to include the build in the future. some cleanup in iwl_read_ucode needed to ensure old header not used and reduce unnecessary references through pointer with the data is already in heap variable. Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-dev.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h31
1 files changed, 23 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index b989d5c08d34..f4afd0c3265f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -66,6 +66,7 @@ extern struct iwl_cfg iwl1000_bgn_cfg;
66/* shared structures from iwl-5000.c */ 66/* shared structures from iwl-5000.c */
67extern struct iwl_mod_params iwl50_mod_params; 67extern struct iwl_mod_params iwl50_mod_params;
68extern struct iwl_ops iwl5000_ops; 68extern struct iwl_ops iwl5000_ops;
69extern struct iwl_ucode_ops iwl5000_ucode;
69extern struct iwl_lib_ops iwl5000_lib; 70extern struct iwl_lib_ops iwl5000_lib;
70extern struct iwl_hcmd_ops iwl5000_hcmd; 71extern struct iwl_hcmd_ops iwl5000_hcmd;
71extern struct iwl_hcmd_utils_ops iwl5000_hcmd_utils; 72extern struct iwl_hcmd_utils_ops iwl5000_hcmd_utils;
@@ -525,15 +526,29 @@ struct fw_desc {
525}; 526};
526 527
527/* uCode file layout */ 528/* uCode file layout */
528struct iwl_ucode { 529struct iwl_ucode_header {
529 __le32 ver; /* major/minor/API/serial */ 530 __le32 ver; /* major/minor/API/serial */
530 __le32 inst_size; /* bytes of runtime instructions */ 531 union {
531 __le32 data_size; /* bytes of runtime data */ 532 struct {
532 __le32 init_size; /* bytes of initialization instructions */ 533 __le32 inst_size; /* bytes of runtime code */
533 __le32 init_data_size; /* bytes of initialization data */ 534 __le32 data_size; /* bytes of runtime data */
534 __le32 boot_size; /* bytes of bootstrap instructions */ 535 __le32 init_size; /* bytes of init code */
535 u8 data[0]; /* data in same order as "size" elements */ 536 __le32 init_data_size; /* bytes of init data */
537 __le32 boot_size; /* bytes of bootstrap code */
538 u8 data[0]; /* in same order as sizes */
539 } v1;
540 struct {
541 __le32 build; /* build number */
542 __le32 inst_size; /* bytes of runtime code */
543 __le32 data_size; /* bytes of runtime data */
544 __le32 init_size; /* bytes of init code */
545 __le32 init_data_size; /* bytes of init data */
546 __le32 boot_size; /* bytes of bootstrap code */
547 u8 data[0]; /* in same order as sizes */
548 } v2;
549 } u;
536}; 550};
551#define UCODE_HEADER_SIZE(ver) ((ver) == 1 ? 24 : 28)
537 552
538struct iwl4965_ibss_seq { 553struct iwl4965_ibss_seq {
539 u8 mac[ETH_ALEN]; 554 u8 mac[ETH_ALEN];