Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[deliverable/linux.git] / drivers / staging / rtl8723au / include / wlan_bssdef.h
CommitLineData
364e30eb
LF
1/******************************************************************************
2 *
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 ******************************************************************************/
15#ifndef __WLAN_BSSDEF_H__
16#define __WLAN_BSSDEF_H__
17
18
19#define MAX_IE_SZ 768
20
21
22#define NDIS_802_11_LENGTH_RATES 8
23#define NDIS_802_11_LENGTH_RATES_EX 16
24
364e30eb
LF
25/* Length is the 4 bytes multiples of the sum of
26 * sizeof(6 * sizeof(unsigned char)) + 2 + sizeof(struct ndis_802_11_ssid) +
27 * sizeof(u32) + sizeof(long) + sizeof(enum ndis_802_11_net_type) +
28 * sizeof(struct ndis_802_11_config) + sizeof(sizeof(unsigned char) *
29 * NDIS_802_11_LENGTH_RATES_EX) + IELength
30 *
31 * Except the IELength, all other fields are fixed length. Therefore,
32 * we can define a macro to present the partial sum.
33 */
34
35enum ndis_802_11_auth_mode {
36 Ndis802_11AuthModeOpen,
37 Ndis802_11AuthModeShared,
38 Ndis802_11AuthModeAutoSwitch,
39 Ndis802_11AuthModeWPA,
40 Ndis802_11AuthModeWPAPSK,
41 Ndis802_11AuthModeWPANone,
42 dis802_11AuthModeMax /* upper bound */
43};
44
45enum {
46 Ndis802_11WEPEnabled,
47 Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
48 Ndis802_11WEPDisabled,
49 Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
50 Ndis802_11WEPKeyAbsent,
51 Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
52 Ndis802_11WEPNotSupported,
53 Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
54 Ndis802_11Encryption2Enabled,
55 Ndis802_11Encryption2KeyAbsent,
56 Ndis802_11Encryption3Enabled,
57 Ndis802_11Encryption3KeyAbsent,
58};
59
364e30eb
LF
60struct wlan_bcn_info {
61 /* these infor get from rtw_get_encrypt_info when
62 * * translate scan to UI */
63 u8 encryp_protocol;/* ENCRYP_PROTOCOL_E: OPEN/WEP/WPA/WPA2 */
64 int group_cipher; /* WPA/WPA2 group cipher */
65 int pairwise_cipher;/* WPA/WPA2/WEP pairwise cipher */
66 int is_8021x;
67
68 /* bwmode 20/40 and ch_offset UP/LOW */
364e30eb
LF
69};
70
71struct wlan_bssid_ex {
72 u32 Length;
73 u8 MacAddress[ETH_ALEN];
74 u16 reserved;
75 struct cfg80211_ssid Ssid;
76 u32 Privacy;
77 long Rssi;/* in dBM, raw data , get from PHY) */
143ced27 78 u16 beacon_interval;
53c66000 79 u16 capability;
993c52ba 80 u64 tsf;
37cb982c
JS
81 u32 ATIMWindow; /* units are Kusec */
82 u32 DSConfig; /* Frequency, units are kHz */
efc7144f 83 enum nl80211_iftype ifmode;
364e30eb 84 unsigned char SupportedRates[NDIS_802_11_LENGTH_RATES_EX];
60b152ce
JS
85 u8 SignalStrength;/* in percentage */
86 u8 SignalQuality;/* in percentage */
364e30eb
LF
87 u32 IELength;
88 u8 IEs[MAX_IE_SZ]; /* timestamp, beacon interval, and capability info*/
89} __packed;
90
91static inline uint get_wlan_bssid_ex_sz(struct wlan_bssid_ex *bss)
92{
93 return sizeof(struct wlan_bssid_ex) - MAX_IE_SZ + bss->IELength;
94}
95
96struct wlan_network {
97 struct list_head list;
98 int network_type; /* refer to ieee80211.h for 11A/B/G */
99 /* set to fixed when not to be removed as site-surveying */
100 int fixed;
101 unsigned long last_scanned; /* timestamp for the network */
364e30eb
LF
102 int join_res;
103 struct wlan_bssid_ex network; /* must be the last item */
104 struct wlan_bcn_info BcnInfo;
105};
106
107enum VRTL_CARRIER_SENSE {
108 DISABLE_VCS,
109 ENABLE_VCS,
110 AUTO_VCS
111};
112
113enum VCS_TYPE {
114 NONE_VCS,
115 RTS_CTS,
116 CTS_TO_SELF
117};
118
119/* john */
120#define NUM_PRE_AUTH_KEY 16
121#define NUM_PMKID_CACHE NUM_PRE_AUTH_KEY
122
123#endif /* ifndef WLAN_BSSDEF_H_ */
This page took 0.232201 seconds and 5 git commands to generate.