4 #define FW_FLAG_LE 0x01 /* little endian? convert */
5 #define FW_FLAG_V4 0x02 /* b43 vs. b43legacy */
7 #define fwcutter_stringify_1(x) #x
8 #define fwcutter_stringify(x) fwcutter_stringify_1(x)
9 #define FWCUTTER_VERSION fwcutter_stringify(FWCUTTER_VERSION_)
11 typedef uint16_t be16_t; /* Big-endian 16bit */
12 typedef uint32_t be32_t; /* Big-endian 32bit */
15 #define bswap_16 bswap16
16 #define bswap_32 bswap32
25 const char *target_dir;
31 uint16_t op1, op2, op3;
34 /* The IV how it's done in the binary driver files. */
38 } __attribute__((__packed__));
41 EXT_UNDEFINED, /* error catcher */
42 EXT_UCODE_1, /* rev <= 4 ucode */
43 EXT_UCODE_2, /* rev 5..14 ucode */
44 EXT_UCODE_3, /* rev >= 15 ucode */
45 EXT_PCM, /* "pcm" values */
46 EXT_IV, /* initial values */
51 const uint32_t offset;
52 const uint32_t length;
53 const enum extract_type type;
56 #define EXTRACT_LIST_END { .name = NULL, }
60 const char *ucode_version;
62 const struct extract *extract;
66 /* The header that's put in to every .fw file */
68 /* Type of the firmware data */
70 /* Version number of the firmware data format */
73 /* Size of the data. For ucode and PCM this is in bytes.
74 * For IV this is in number-of-ivs. */
76 } __attribute__((__packed__));
78 #define FW_TYPE_UCODE 'u'
79 #define FW_TYPE_PCM 'p'
80 #define FW_TYPE_IV 'i'
82 #define FW_HDR_VER 0x01
84 /* The IV in the .fw file */
90 } data __attribute__((__packed__));
91 } __attribute__((__packed__));
93 #define FW_IV_OFFSET_MASK 0x7FFF
94 #define FW_IV_32BIT 0x8000
97 #endif /* _FWCUTTER_H_ */