aboutsummaryrefslogtreecommitdiff
path: root/at76_usb.h
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2007-05-01 20:00:46 -0400
committerGuido Guenther <agx@bogon.sigxcpu.org>2007-05-02 11:22:17 +0200
commit422e7aba187883c60075b2ef914e56d505862939 (patch)
treeccae1d5668053225120705ef58061a1ef9ebdc21 /at76_usb.h
parent68536974195f76615b8948abb1a92b29a4853ff2 (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.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/at76_usb.h b/at76_usb.h
index a74b3c5..97f46d6 100644
--- a/at76_usb.h
+++ b/at76_usb.h
@@ -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 {