2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
3 * The ACX100 Open Source Project <acx100-devel@lists.sourceforge.net>
4 * Copyright (C) 2008 Francis Galiegue <fgaliegue@gmail.com> for the ACX100
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef _ACX_FIRMWARE_H_
23 #define _ACX_FIRMWARE_H_
25 /* Define a random 100 bytes more to catch firmware versions which
26 * provide a bigger struct */
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 */
141 typedef struct fw_ver
{
146 } __attribute__ ((packed
)) fw_ver_t
;
148 #define FW_ID_SIZE 20
150 #endif /* _ACX_FIRMWARE_H_ */