1 #ifndef _ACX_FIRMWARE_H_
2 #define _ACX_FIRMWARE_H_
5 * acx_firmware.h: firmware-related structures and constants.
7 * Copyright (c) 2008 Francis Galiegue <fgaliegue@gmail.com> for the ACX100
10 * This file is licensed under the GPL version 2. See the README file for
15 * The original comments talk about "firmware statistics". I take it this means
16 * that you can read from these structures and gather values.
20 * The original comment defined this constant as "a random 100 bytes more to
21 * catch firmware versions which provide a bigger struct".
23 * Err, FIXME! Does that mean that this area could actually be written to beyond
27 #define FW_STATS_FUTURE_EXTENSION 100
29 typedef struct firmware_image
{
32 u8 data
[1]; /* the byte array of the actual firmware... */
33 } __attribute__ ((packed
)) firmware_image_t
;
35 typedef struct fw_stats_tx
{
37 } __attribute__ ((packed
)) fw_stats_tx_t
;
39 typedef struct fw_stats_rx
{
42 u32 rx_hw_stuck
; /* old: u32 rx_hdr_use_next */
46 u32 rx_aci_events
; /* later versions only */
47 u32 rx_aci_resets
; /* later versions only */
48 } __attribute__ ((packed
)) fw_stats_rx_t
;
50 typedef struct fw_stats_dma
{
55 } __attribute__ ((packed
)) fw_stats_dma_t
;
57 typedef struct fw_stats_irq
{
72 u32 hw_pm_mode_changes
;
76 } __attribute__ ((packed
)) fw_stats_irq_t
;
78 typedef struct fw_stats_wep
{
80 u32 wep_default_key_count
;
81 u32 dot11_def_key_mib
;
82 u32 wep_key_not_found
;
86 } __attribute__ ((packed
)) fw_stats_wep_t
;
88 typedef struct fw_stats_pwr
{
90 u32 no_ps_tx_too_short
;
92 u32 no_ps_rx_too_short
;
94 u32 no_lppd_too_noisy
;
95 u32 no_lppd_too_short
;
96 u32 no_lppd_matching_frame
;
97 } __attribute__ ((packed
)) fw_stats_pwr_t
;
99 typedef struct fw_stats_mic
{
102 } __attribute__ ((packed
)) fw_stats_mic_t
;
104 typedef struct fw_stats_aes
{
111 } __attribute__ ((packed
)) fw_stats_aes_t
;
113 typedef struct fw_stats_event
{
122 } __attribute__ ((packed
)) fw_stats_event_t
;
124 /* mainly for size calculation only */
125 typedef struct fw_stats
{
136 fw_stats_event_t evt
;
137 u8 _padding
[FW_STATS_FUTURE_EXTENSION
];
140 /* Firmware version struct */
142 typedef struct fw_ver
{
147 } __attribute__ ((packed
)) fw_ver_t
;
149 #define FW_ID_SIZE 20
151 #endif /* _ACX_FIRMWARE_H_ */