1
/* include/acx100_helper2.h
3
* --------------------------------------------------------------------
5
* Copyright (C) 2003 ACX100 Open Source Project
7
* The contents of this file are subject to the Mozilla Public
8
* License Version 1.1 (the "License"); you may not use this file
9
* except in compliance with the License. You may obtain a copy of
10
* the License at http://www.mozilla.org/MPL/
12
* Software distributed under the License is distributed on an "AS
13
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
14
* implied. See the License for the specific language governing
15
* rights and limitations under the License.
17
* Alternatively, the contents of this file may be used under the
18
* terms of the GNU Public License version 2 (the "GPL"), in which
19
* case the provisions of the GPL are applicable instead of the
20
* above. If you wish to allow the use of your version of this file
21
* only under the terms of the GPL and not to allow others to use
22
* your version of this file under the MPL, indicate your decision
23
* by deleting the provisions above and replace them with the notice
24
* and other provisions required by the GPL. If you do not delete
25
* the provisions above, a recipient may use your version of this
26
* file under either the MPL or the GPL.
28
* --------------------------------------------------------------------
30
* Inquiries regarding the ACX100 Open Source Project can be
33
* acx100-users@lists.sf.net
34
* http://acx100.sf.net
36
* --------------------------------------------------------------------
38
#ifndef __ACX_ACX100_HELPER2_H
39
#define __ACX_ACX100_HELPER2_H
41
#define MAX_NUMBER_OF_SITE 31
44
u8 element_ID ACX_PACKED;
46
u8 inf[32] ACX_PACKED;
49
typedef struct rates {
50
u8 element_ID ACX_PACKED;
52
u8 sup_rates[8] ACX_PACKED;
56
u8 element_ID ACX_PACKED;
58
u16 dwell_time ACX_PACKED;
59
u8 hop_set ACX_PACKED;
60
u8 hop_pattern ACX_PACKED;
61
u8 hop_index ACX_PACKED;
65
u8 element_ID ACX_PACKED;
67
u8 curr_channel ACX_PACKED;
71
u8 element_ID ACX_PACKED;
73
u8 cfp_count ACX_PACKED;
74
u8 cfp_period ACX_PACKED;
75
u16 cfp_max_dur ACX_PACKED;
76
u16 cfp_dur_rem ACX_PACKED;
79
typedef struct challenge_text {
80
u8 element_ID ACX_PACKED;
82
u8 text[253] ACX_PACKED;
86
/* Warning. Several types used in below structs are
87
** in fact variable length. Use structs with such fields with caution */
88
typedef struct auth_frame_body {
89
u16 auth_alg ACX_PACKED;
90
u16 auth_seq ACX_PACKED;
91
u16 status ACX_PACKED;
92
challenge_text_t challenge ACX_PACKED;
95
typedef struct assocresp_frame_body {
96
u16 cap_info ACX_PACKED;
97
u16 status ACX_PACKED;
99
rates_t rates ACX_PACKED;
100
} assocresp_frame_body_t;
102
typedef struct reassocreq_frame_body {
103
u16 cap_info ACX_PACKED;
104
u16 listen_int ACX_PACKED;
105
u8 current_ap[6] ACX_PACKED;
106
ssid_t ssid ACX_PACKED;
107
rates_t rates ACX_PACKED;
108
} reassocreq_frame_body_t;
110
typedef struct reassocresp_frame_body {
111
u16 cap_info ACX_PACKED;
112
u16 status ACX_PACKED;
114
rates_t rates ACX_PACKED;
115
} reassocresp_frame_body_t;
117
typedef struct deauthen_frame_body {
118
u16 reason ACX_PACKED;
119
} deauthen_frame_body_t;
121
typedef struct disassoc_frame_body {
122
u16 reason ACX_PACKED;
123
} disassoc_frame_body_t;
125
typedef struct probereq_frame_body {
126
ssid_t ssid ACX_PACKED;
127
rates_t rates ACX_PACKED;
128
} probereq_frame_body_t;
130
typedef struct proberesp_frame_body {
131
u8 timestamp[8] ACX_PACKED;
132
u16 beacon_int ACX_PACKED;
133
u16 cap_info ACX_PACKED;
134
ssid_t ssid ACX_PACKED;
135
rates_t rates ACX_PACKED;
136
fhps_t fhps ACX_PACKED;
137
dsps_t dsps ACX_PACKED;
138
cfps_t cfps ACX_PACKED;
139
} proberesp_frame_body_t;
141
void acx_sta_list_init(wlandevice_t *priv);
142
void acx_set_status(wlandevice_t *priv, u16 status);
143
int acx_rx_ieee802_11_frame(wlandevice_t *priv, rxhostdesc_t *desc);
144
u32 acx_transmit_disassoc(client_t *arg_0, wlandevice_t *priv);
145
void acx_timer(unsigned long a);
146
void acx_complete_dot11_scan(wlandevice_t *priv);
148
#define COUNT_STATE_STR 6
150
static inline const char *acx_get_status_name(u16 status)
152
extern const char * const g_wlan_state_str[COUNT_STATE_STR];
153
return g_wlan_state_str[
154
(status < COUNT_STATE_STR) ?
155
status : COUNT_STATE_STR-1
159
#endif /* __ACX_ACX100_HELPER2_H */