diff options
author | Pavel Roskin <proski@gnu.org> | 2007-05-01 20:00:46 -0400 |
---|---|---|
committer | Guido Guenther <agx@bogon.sigxcpu.org> | 2007-05-02 11:22:17 +0200 |
commit | 422e7aba187883c60075b2ef914e56d505862939 (patch) | |
tree | ccae1d5668053225120705ef58061a1ef9ebdc21 /at76_usb.h | |
parent | 68536974195f76615b8948abb1a92b29a4853ff2 (diff) |
[PATCH] Rename at76_get_fw_info() to at76_parse_fw(), fully rewrite
Use a structure to describe the firmware header. Don't pass any
arguments fpr output, just pass the pointer to the private data. Move
some debugging output there to avoid code duplication.
Parse firmware even if it doesn't need to be loaded. Keep firmware
version information in the private data. It's still re-read from the
card, but now we have a valid version earlier.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Diffstat (limited to 'at76_usb.h')
-rw-r--r-- | at76_usb.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -364,6 +364,19 @@ struct mib_mdomain { u8 channel_list[14]; /* 0 for invalid channels */ } __attribute__ ((packed)); +struct at76_fw_header { + __le32 crc; /* CRC32 of the whole image */ + __le32 board_type; /* firmware compatibility code */ + u8 build; /* firmware build number */ + u8 patch; /* firmware patch level */ + u8 minor; /* firmware minor version */ + u8 major; /* firmware major version */ + __le32 str_offset; /* offset of the copyright string */ + __le32 int_fw_offset; /* internal firmware image offset */ + __le32 int_fw_len; /* internal firmware image length */ + __le32 ext_fw_offset; /* external firmware image offset */ + __le32 ext_fw_len; /* external firmware image length */ +} __attribute__ ((packed)); /* states in infrastructure mode */ enum infra_state { |