mac80211: remove linux/wireless.h inclusion
[deliverable/linux.git] / drivers / net / wireless / mwifiex / ioctl.h
CommitLineData
5e6e3a92
BZ
1/*
2 * Marvell Wireless LAN device driver: ioctl data structures & APIs
3 *
4 * Copyright (C) 2011, Marvell International Ltd.
5 *
6 * This software file (the "File") is distributed by Marvell International
7 * Ltd. under the terms of the GNU General Public License Version 2, June 1991
8 * (the "License"). You may use, redistribute and/or modify this File in
9 * accordance with the terms and conditions of the License, a copy of which
10 * is available by writing to the Free Software Foundation, Inc.,
11 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
12 * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
13 *
14 * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
16 * ARE EXPRESSLY DISCLAIMED. The License provides additional details about
17 * this warranty disclaimer.
18 */
19
20#ifndef _MWIFIEX_IOCTL_H_
21#define _MWIFIEX_IOCTL_H_
22
bb9b08af 23#include <linux/wireless.h>
5e6e3a92
BZ
24#include <net/mac80211.h>
25
5e6e3a92
BZ
26enum {
27 MWIFIEX_SCAN_TYPE_UNCHANGED = 0,
28 MWIFIEX_SCAN_TYPE_ACTIVE,
29 MWIFIEX_SCAN_TYPE_PASSIVE
30};
31
5e6e3a92
BZ
32struct mwifiex_user_scan {
33 u32 scan_cfg_len;
34 u8 scan_cfg_buf[1];
35};
36
5e6e3a92
BZ
37#define MWIFIEX_PROMISC_MODE 1
38#define MWIFIEX_MULTICAST_MODE 2
39#define MWIFIEX_ALL_MULTI_MODE 4
40#define MWIFIEX_MAX_MULTICAST_LIST_SIZE 32
41
42struct mwifiex_multicast_list {
43 u32 mode;
44 u32 num_multicast_addr;
45 u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN];
46};
47
5e6e3a92
BZ
48struct mwifiex_chan_freq {
49 u32 channel;
50 u32 freq;
51};
52
5e6e3a92
BZ
53struct mwifiex_ssid_bssid {
54 struct mwifiex_802_11_ssid ssid;
55 u8 bssid[ETH_ALEN];
56};
57
58enum {
59 BAND_B = 1,
60 BAND_G = 2,
61 BAND_A = 4,
62 BAND_GN = 8,
63 BAND_AN = 16,
64};
65
66#define NO_SEC_CHANNEL 0
67#define SEC_CHANNEL_ABOVE 1
68#define SEC_CHANNEL_BELOW 3
69
70struct mwifiex_ds_band_cfg {
71 u32 config_bands;
72 u32 adhoc_start_band;
73 u32 adhoc_channel;
74 u32 sec_chan_offset;
75};
76
77enum {
78 ADHOC_IDLE,
79 ADHOC_STARTED,
80 ADHOC_JOINED,
81 ADHOC_COALESCED
82};
83
84struct mwifiex_ds_get_stats {
85 u32 mcast_tx_frame;
86 u32 failed;
87 u32 retry;
88 u32 multi_retry;
89 u32 frame_dup;
90 u32 rts_success;
91 u32 rts_failure;
92 u32 ack_failure;
93 u32 rx_frag;
94 u32 mcast_rx_frame;
95 u32 fcs_error;
96 u32 tx_frame;
97 u32 wep_icv_error[4];
98};
99
5e6e3a92 100#define BCN_RSSI_AVG_MASK 0x00000002
5e6e3a92 101#define BCN_NF_AVG_MASK 0x00000200
5e6e3a92
BZ
102#define ALL_RSSI_INFO_MASK 0x00000fff
103
104struct mwifiex_ds_get_signal {
105 /*
106 * Bit0: Last Beacon RSSI, Bit1: Average Beacon RSSI,
107 * Bit2: Last Data RSSI, Bit3: Average Data RSSI,
108 * Bit4: Last Beacon SNR, Bit5: Average Beacon SNR,
109 * Bit6: Last Data SNR, Bit7: Average Data SNR,
110 * Bit8: Last Beacon NF, Bit9: Average Beacon NF,
111 * Bit10: Last Data NF, Bit11: Average Data NF
112 */
113 u16 selector;
114 s16 bcn_rssi_last;
115 s16 bcn_rssi_avg;
116 s16 data_rssi_last;
117 s16 data_rssi_avg;
118 s16 bcn_snr_last;
119 s16 bcn_snr_avg;
120 s16 data_snr_last;
121 s16 data_snr_avg;
122 s16 bcn_nf_last;
123 s16 bcn_nf_avg;
124 s16 data_nf_last;
125 s16 data_nf_avg;
126};
127
5e6e3a92
BZ
128#define MWIFIEX_MAX_VER_STR_LEN 128
129
130struct mwifiex_ver_ext {
131 u32 version_str_sel;
132 char version_str[MWIFIEX_MAX_VER_STR_LEN];
133};
134
135struct mwifiex_bss_info {
136 u32 bss_mode;
137 struct mwifiex_802_11_ssid ssid;
138 u32 scan_table_idx;
139 u32 bss_chan;
140 u32 region_code;
141 u32 media_connected;
5e6e3a92
BZ
142 u32 max_power_level;
143 u32 min_power_level;
144 u32 adhoc_state;
145 signed int bcn_nf_last;
146 u32 wep_status;
147 u32 is_hs_configured;
148 u32 is_deep_sleep;
149 u8 bssid[ETH_ALEN];
150};
151
152#define MAX_NUM_TID 8
153
154#define MAX_RX_WINSIZE 64
155
156struct mwifiex_ds_rx_reorder_tbl {
157 u16 tid;
158 u8 ta[ETH_ALEN];
159 u32 start_win;
160 u32 win_size;
161 u32 buffer[MAX_RX_WINSIZE];
162};
163
164struct mwifiex_ds_tx_ba_stream_tbl {
165 u16 tid;
166 u8 ra[ETH_ALEN];
167};
168
169#define DBG_CMD_NUM 5
170
171struct mwifiex_debug_info {
172 u32 int_counter;
173 u32 packets_out[MAX_NUM_TID];
174 u32 max_tx_buf_size;
175 u32 tx_buf_size;
176 u32 curr_tx_buf_size;
177 u32 tx_tbl_num;
178 struct mwifiex_ds_tx_ba_stream_tbl
179 tx_tbl[MWIFIEX_MAX_TX_BASTREAM_SUPPORTED];
180 u32 rx_tbl_num;
181 struct mwifiex_ds_rx_reorder_tbl rx_tbl
182 [MWIFIEX_MAX_RX_BASTREAM_SUPPORTED];
183 u16 ps_mode;
184 u32 ps_state;
185 u8 is_deep_sleep;
186 u8 pm_wakeup_card_req;
187 u32 pm_wakeup_fw_try;
188 u8 is_hs_configured;
189 u8 hs_activated;
190 u32 num_cmd_host_to_card_failure;
191 u32 num_cmd_sleep_cfm_host_to_card_failure;
192 u32 num_tx_host_to_card_failure;
193 u32 num_event_deauth;
194 u32 num_event_disassoc;
195 u32 num_event_link_lost;
196 u32 num_cmd_deauth;
197 u32 num_cmd_assoc_success;
198 u32 num_cmd_assoc_failure;
199 u32 num_tx_timeout;
200 u32 num_cmd_timeout;
201 u16 timeout_cmd_id;
202 u16 timeout_cmd_act;
203 u16 last_cmd_id[DBG_CMD_NUM];
204 u16 last_cmd_act[DBG_CMD_NUM];
205 u16 last_cmd_index;
206 u16 last_cmd_resp_id[DBG_CMD_NUM];
207 u16 last_cmd_resp_index;
208 u16 last_event[DBG_CMD_NUM];
209 u16 last_event_index;
210 u8 data_sent;
211 u8 cmd_sent;
212 u8 cmd_resp_received;
213 u8 event_received;
214};
215
5e6e3a92 216#define MWIFIEX_KEY_INDEX_UNICAST 0x40000000
5e6e3a92
BZ
217#define WAPI_RXPN_LEN 16
218
219struct mwifiex_ds_encrypt_key {
220 u32 key_disable;
221 u32 key_index;
222 u32 key_len;
a3731658 223 u8 key_material[WLAN_MAX_KEY_LEN];
5e6e3a92
BZ
224 u8 mac_addr[ETH_ALEN];
225 u32 is_wapi_key;
226 u8 wapi_rxpn[WAPI_RXPN_LEN];
227};
228
229struct mwifiex_rate_cfg {
230 u32 action;
231 u32 is_rate_auto;
232 u32 rate;
233};
234
5e6e3a92
BZ
235struct mwifiex_power_cfg {
236 u32 is_power_auto;
237 u32 power_level;
238};
239
240struct mwifiex_ds_hs_cfg {
241 u32 is_invoke_hostcmd;
242 /* Bit0: non-unicast data
243 * Bit1: unicast data
244 * Bit2: mac events
245 * Bit3: magic packet
246 */
247 u32 conditions;
248 u32 gpio;
249 u32 gap;
250};
251
252#define DEEP_SLEEP_ON 1
a0490936 253#define DEEP_SLEEP_OFF 0
5e6e3a92 254#define DEEP_SLEEP_IDLE_TIME 100
a8c48565 255#define PS_MODE_AUTO 1
5e6e3a92
BZ
256
257struct mwifiex_ds_auto_ds {
258 u16 auto_ds;
259 u16 idle_time;
260};
261
5e6e3a92
BZ
262struct mwifiex_ds_pm_cfg {
263 union {
264 u32 ps_mode;
265 struct mwifiex_ds_hs_cfg hs_cfg;
266 struct mwifiex_ds_auto_ds auto_deep_sleep;
267 u32 sleep_period;
268 } param;
269};
270
5e6e3a92
BZ
271struct mwifiex_ds_11n_tx_cfg {
272 u16 tx_htcap;
273 u16 tx_htinfo;
274};
275
276struct mwifiex_ds_11n_amsdu_aggr_ctrl {
277 u16 enable;
278 u16 curr_buf_size;
279};
280
281#define MWIFIEX_NUM_OF_CMD_BUFFER 20
282#define MWIFIEX_SIZE_OF_CMD_BUFFER 2048
283
284enum {
285 MWIFIEX_IE_TYPE_GEN_IE = 0,
286 MWIFIEX_IE_TYPE_ARP_FILTER,
287};
288
289enum {
290 MWIFIEX_REG_MAC = 1,
291 MWIFIEX_REG_BBP,
292 MWIFIEX_REG_RF,
293 MWIFIEX_REG_PMIC,
294 MWIFIEX_REG_CAU,
295};
296
297struct mwifiex_ds_reg_rw {
298 __le32 type;
299 __le32 offset;
300 __le32 value;
301};
302
303#define MAX_EEPROM_DATA 256
304
305struct mwifiex_ds_read_eeprom {
306 __le16 offset;
307 __le16 byte_count;
308 u8 value[MAX_EEPROM_DATA];
309};
310
311struct mwifiex_ds_misc_gen_ie {
312 u32 type;
313 u32 len;
314 u8 ie_data[IW_CUSTOM_MAX];
315};
316
317struct mwifiex_ds_misc_cmd {
318 u32 len;
319 u8 cmd[MWIFIEX_SIZE_OF_CMD_BUFFER];
320};
321
322#define MWIFIEX_MAX_VSIE_LEN (256)
323#define MWIFIEX_MAX_VSIE_NUM (8)
324#define MWIFIEX_VSIE_MASK_SCAN 0x01
325#define MWIFIEX_VSIE_MASK_ASSOC 0x02
326#define MWIFIEX_VSIE_MASK_ADHOC 0x04
327
328enum {
329 MWIFIEX_FUNC_INIT = 1,
330 MWIFIEX_FUNC_SHUTDOWN,
331};
332
333#endif /* !_MWIFIEX_IOCTL_H_ */
This page took 0.085398 seconds and 5 git commands to generate.