2 * Copyright (c) 2007-2008 Atheros Communications Inc.
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 /* Module Name : athr_common.h */
19 /* WPA related function and data structure definitions. */
22 /* Platform dependent. */
24 /************************************************************************/
26 #ifndef _ATHR_COMMON_H
27 #define _ATHR_COMMON_H
29 #define ZD_IOCTL_WPA (SIOCDEVPRIVATE + 1)
30 #define ZD_IOCTL_PARAM (SIOCDEVPRIVATE + 2)
31 #define ZD_IOCTL_GETWPAIE (SIOCDEVPRIVATE + 3)
32 #define ZD_PARAM_ROAMING 0x0001
33 #define ZD_PARAM_PRIVACY 0x0002
34 #define ZD_PARAM_WPA 0x0003
35 #define ZD_PARAM_COUNTERMEASURES 0x0004
36 #define ZD_PARAM_DROPUNENCRYPTED 0x0005
37 #define ZD_PARAM_AUTH_ALGS 0x0006
39 #define ZD_CMD_SET_ENCRYPT_KEY 0x0001
40 #define ZD_CMD_SET_MLME 0x0002
41 #define ZD_CMD_SCAN_REQ 0x0003
42 #define ZD_CMD_SET_GENERIC_ELEMENT 0x0004
43 #define ZD_CMD_GET_TSC 0x0005
45 #define ZD_FLAG_SET_TX_KEY 0x0001
47 #define ZD_GENERIC_ELEMENT_HDR_LEN \
48 ((int) (&((struct athr_wlan_param *) 0)->u.generic_elem.data))
50 #define ZD_CRYPT_ALG_NAME_LEN 16
51 #define ZD_MAX_KEY_SIZE 32
52 #define ZD_MAX_GENERIC_SIZE 64
54 #define IEEE80211_ADDR_LEN 6
55 #define IEEE80211_MAX_IE_SIZE 256
58 #define ZM_CMD_WAPI_SETWAPI 0x0001
59 #define ZM_CMD_WAPI_GETWAPI 0x0002
60 #define ZM_CMD_WAPI_SETKEY 0x0003
61 #define ZM_CMD_WAPI_GETKEY 0x0004
62 #define ZM_CMD_WAPI_REKEY 0x0005
64 #define ZM_WAPI_WAI_REQUEST 0x00f1
65 #define ZM_WAPI_UNICAST_REKEY 0x00f2
66 #define ZM_WAPI_STA_AGING 0x00f3
67 #define ZM_WAPI_MULTI_REKEY 0x00f4
69 #define ZM_WAPI_KEY_SIZE 32
70 #define ZM_WAPI_IV_LEN 16
71 #endif //ZM_ENALBE_WAPI
72 /* structure definition */
74 struct athr_wlan_param
{
76 u8 sta_addr
[ETH_ALEN
];
79 u8 alg
[ZD_CRYPT_ALG_NAME_LEN
];
83 u8 seq
[8]; /* sequence counter (set: RX, get: TX) */
85 u8 key
[ZD_MAX_KEY_SIZE
];
93 u8 data
[ZD_MAX_GENERIC_SIZE
];
96 #define MLME_STA_DEAUTH 0
97 #define MLME_STA_DISASSOC 1
108 struct ieee80211req_wpaie
{
109 u8 wpa_macaddr
[IEEE80211_ADDR_LEN
];
110 u8 wpa_ie
[IEEE80211_MAX_IE_SIZE
];
113 #ifdef ZM_ENALBE_WAPI
114 struct athr_wapi_param
{
120 u8 sta_addr
[ETH_ALEN
];
123 u8 key
[ZM_WAPI_KEY_SIZE
];
131 struct athr_wapi_sta_info
135 u8 sta_mac
[ETH_ALEN
];
137 u8 gsn
[ZM_WAPI_IV_LEN
];
140 #endif //ZM_ENALBE_WAPI