]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - drivers/staging/winbond/gl_80211.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
[mirror_ubuntu-jammy-kernel.git] / drivers / staging / winbond / gl_80211.h
1
2 #ifndef __GL_80211_H__
3 #define __GL_80211_H__
4
5 /****************** CONSTANT AND MACRO SECTION ******************************/
6
7 /* BSS Type */
8 enum {
9 WLAN_BSSTYPE_INFRASTRUCTURE = 0,
10 WLAN_BSSTYPE_INDEPENDENT,
11 WLAN_BSSTYPE_ANY_BSS,
12 };
13
14
15
16 /* Preamble_Type, see <SFS-802.11G-MIB-203> */
17 typedef enum preamble_type {
18 WLAN_PREAMBLE_TYPE_SHORT,
19 WLAN_PREAMBLE_TYPE_LONG,
20 } preamble_type_e;
21
22
23 /* Slot_Time_Type, see <SFS-802.11G-MIB-208> */
24 typedef enum slot_time_type {
25 WLAN_SLOT_TIME_TYPE_LONG,
26 WLAN_SLOT_TIME_TYPE_SHORT,
27 } slot_time_type_e;
28
29 /*--------------------------------------------------------------------------*/
30 /* Encryption Mode */
31 typedef enum {
32 WEP_DISABLE = 0,
33 WEP_64,
34 WEP_128,
35
36 ENCRYPT_DISABLE,
37 ENCRYPT_WEP,
38 ENCRYPT_WEP_NOKEY,
39 ENCRYPT_TKIP,
40 ENCRYPT_TKIP_NOKEY,
41 ENCRYPT_CCMP,
42 ENCRYPT_CCMP_NOKEY,
43 } encryption_mode_e;
44
45 typedef enum _WLAN_RADIO {
46 WLAN_RADIO_ON,
47 WLAN_RADIO_OFF,
48 WLAN_RADIO_MAX, // not a real type, defined as an upper bound
49 } WLAN_RADIO;
50
51 typedef struct _WLAN_RADIO_STATUS {
52 WLAN_RADIO HWStatus;
53 WLAN_RADIO SWStatus;
54 } WLAN_RADIO_STATUS;
55
56 //----------------------------------------------------------------------------
57 // 20041021 1.1.81.1000 ybjiang
58 // add for radio notification
59 typedef
60 void (*RADIO_NOTIFICATION_HANDLER)(
61 void *Data,
62 void *RadioStatusBuffer,
63 u32 RadioStatusBufferLen
64 );
65
66 typedef struct _WLAN_RADIO_NOTIFICATION
67 {
68 RADIO_NOTIFICATION_HANDLER RadioChangeHandler;
69 void *Data;
70 } WLAN_RADIO_NOTIFICATION;
71
72 //----------------------------------------------------------------------------
73 // 20041102 1.1.91.1000 ybjiang
74 // add for OID_802_11_CUST_REGION_CAPABILITIES and OID_802_11_OID_REGION
75 typedef enum _WLAN_REGION_CODE
76 {
77 WLAN_REGION_UNKNOWN,
78 WLAN_REGION_EUROPE,
79 WLAN_REGION_JAPAN,
80 WLAN_REGION_USA,
81 WLAN_REGION_FRANCE,
82 WLAN_REGION_SPAIN,
83 WLAN_REGION_ISRAEL,
84 WLAN_REGION_MAX, // not a real type, defined as an upper bound
85 } WLAN_REGION_CODE;
86
87 #define REGION_NAME_MAX_LENGTH 256
88
89 typedef struct _WLAN_REGION_CHANNELS
90 {
91 u32 Length;
92 u32 NameLength;
93 u8 Name[REGION_NAME_MAX_LENGTH];
94 WLAN_REGION_CODE Code;
95 u32 Frequency[1];
96 } WLAN_REGION_CHANNELS;
97
98 typedef struct _WLAN_REGION_CAPABILITIES
99 {
100 u32 NumberOfItems;
101 WLAN_REGION_CHANNELS Region[1];
102 } WLAN_REGION_CAPABILITIES;
103
104 typedef struct _region_name_map {
105 WLAN_REGION_CODE region;
106 u8 *name;
107 u32 *channels;
108 } region_name_map;
109
110 /*--------------------------------------------------------------------------*/
111 #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
112 #define MACSTR "%02X:%02X:%02X:%02X:%02X:%02X"
113
114 // TODO: 0627 kevin
115 #define MIC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5], (a)[6], (a)[7]
116 #define MICSTR "%02X %02X %02X %02X %02X %02X %02X %02X"
117
118 #define MICKEY2STR(a) MIC2STR(a)
119 #define MICKEYSTR MICSTR
120
121
122 #endif /* __GL_80211_H__ */
123 /*** end of file ***/
124
125