83f766c4458007228c76459d5034055716a0dfbd
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / combo_mt66xx / mt6628 / wlan / os / linux / include / gl_cfg80211.h
1 /*
2 ** $Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/os/linux/include/gl_cfg80211.h#1 $
3 */
4
5 /*! \file   gl_cfg80211.h
6     \brief  This file is for Portable Driver linux cfg80211 support.
7 */
8
9
10
11 /*
12 ** $Log: gl_cfg80211.h $
13 ** 
14 ** 09 12 2012 wcpadmin
15 ** [ALPS00276400] Remove MTK copyright and legal header on GPL/LGPL related packages
16 ** .
17 ** 
18 ** 08 30 2012 chinglan.wang
19 ** [ALPS00349664] [6577JB][WIFI] Phone can not connect to AP secured with AES via WPS in 802.11n Only
20 ** .
21  *
22 */
23
24 #ifndef _GL_CFG80211_H
25 #define _GL_CFG80211_H
26
27 /*******************************************************************************
28 *                         C O M P I L E R   F L A G S
29 ********************************************************************************
30 */
31
32 /*******************************************************************************
33 *                    E X T E R N A L   R E F E R E N C E S
34 ********************************************************************************
35 */
36 #include <linux/kernel.h>
37 #include <linux/netdevice.h>
38 #include <linux/wireless.h>
39 #include <linux/ieee80211.h>
40 #include <net/cfg80211.h>
41
42 #include "gl_os.h"
43
44 /*******************************************************************************
45 *                              C O N S T A N T S
46 ********************************************************************************
47 */
48
49 /*******************************************************************************
50 *                             D A T A   T Y P E S
51 ********************************************************************************
52 */
53
54 /*******************************************************************************
55 *                            P U B L I C   D A T A
56 ********************************************************************************
57 */
58
59 /*******************************************************************************
60 *                           P R I V A T E   D A T A
61 ********************************************************************************
62 */
63
64 /*******************************************************************************
65 *                                 M A C R O S
66 ********************************************************************************
67 */
68
69 /*******************************************************************************
70 *                  F U N C T I O N   D E C L A R A T I O N S
71 ********************************************************************************
72 */
73 /* cfg80211 hooks */
74 int 
75 mtk_cfg80211_change_iface (
76     struct wiphy *wiphy,
77     struct net_device *ndev,
78     enum nl80211_iftype type,
79     u32 *flags,
80     struct vif_params *params
81     );
82
83
84 int
85 mtk_cfg80211_add_key (
86     struct wiphy *wiphy,
87     struct net_device *ndev,
88     u8 key_index,
89     bool pairwise,
90     const u8 *mac_addr,
91     struct key_params *params
92     );
93
94
95 int 
96 mtk_cfg80211_get_key (
97     struct wiphy *wiphy,
98     struct net_device *ndev,
99     u8 key_index,
100     bool pairwise,
101     const u8 *mac_addr,
102     void *cookie,
103     void (*callback)(void *cookie, struct key_params*)
104     );
105
106
107 int
108 mtk_cfg80211_del_key (
109     struct wiphy *wiphy,
110     struct net_device *ndev,
111     u8 key_index,
112     bool pairwise,
113     const u8 *mac_addr
114     );
115
116
117 int 
118 mtk_cfg80211_set_default_key (
119     struct wiphy *wiphy,
120     struct net_device *ndev,
121     u8 key_index,
122     bool unicast,
123     bool multicast
124     );
125
126
127 int
128 mtk_cfg80211_get_station (
129     struct wiphy *wiphy,
130     struct net_device *ndev,
131     u8 *mac,
132     struct station_info *sinfo
133     );
134
135
136 int 
137 mtk_cfg80211_scan (
138     struct wiphy *wiphy,
139     struct net_device *ndev,
140     struct cfg80211_scan_request *request
141     );
142
143
144 int
145 mtk_cfg80211_connect (
146     struct wiphy *wiphy,
147     struct net_device *ndev,
148     struct cfg80211_connect_params *sme
149     );
150
151
152 int 
153 mtk_cfg80211_disconnect (
154     struct wiphy *wiphy,
155     struct net_device *ndev,
156     u16 reason_code
157     );
158
159
160 int
161 mtk_cfg80211_join_ibss (
162     struct wiphy *wiphy,
163     struct net_device *ndev,
164     struct cfg80211_ibss_params *params
165     );
166
167
168 int
169 mtk_cfg80211_leave_ibss (
170     struct wiphy *wiphy,
171     struct net_device *ndev
172     );
173
174
175 int
176 mtk_cfg80211_set_power_mgmt (
177     struct wiphy *wiphy,
178     struct net_device *ndev,
179     bool enabled,
180     int timeout
181     );
182
183
184 int
185 mtk_cfg80211_set_pmksa (
186     struct wiphy *wiphy,
187     struct net_device *ndev,
188     struct cfg80211_pmksa *pmksa
189     );
190
191
192 int
193 mtk_cfg80211_del_pmksa (
194     struct wiphy *wiphy,
195     struct net_device *ndev,
196     struct cfg80211_pmksa *pmksa
197     );
198
199
200 int
201 mtk_cfg80211_flush_pmksa (
202     struct wiphy *wiphy,
203     struct net_device *ndev
204     );
205
206
207 int 
208 mtk_cfg80211_remain_on_channel (
209     struct wiphy *wiphy,
210     struct net_device *ndev,
211     struct ieee80211_channel *chan,
212     enum nl80211_channel_type channel_type,
213     unsigned int duration,
214     u64 *cookie
215     );
216
217
218 int
219 mtk_cfg80211_cancel_remain_on_channel (
220     struct wiphy *wiphy,
221     struct net_device *ndev,
222     u64 cookie
223     );
224
225
226 int
227 mtk_cfg80211_mgmt_tx (
228     struct wiphy *wiphy,
229     struct net_device *ndev,
230     struct ieee80211_channel *channel,
231     bool offscan,
232     enum nl80211_channel_type channel_type,
233     bool channel_type_valid,
234     unsigned int wait,
235     const u8 *buf,
236     size_t len,
237     bool no_cck,
238     bool dont_wait_for_ack,
239     u64 *cookie
240     );
241
242
243 int
244 mtk_cfg80211_mgmt_tx_cancel_wait (
245     struct wiphy *wiphy,
246     struct net_device *ndev,
247     u64 cookie
248     );
249
250 #if CONFIG_NL80211_TESTMODE
251 int
252 mtk_cfg80211_testmode_cmd(
253     IN struct wiphy *wiphy,
254     IN void *data,
255     IN int len
256     );
257
258 int
259 mtk_cfg80211_testmode_sw_cmd(
260     IN struct wiphy *wiphy,
261     IN void *data,
262     IN int len
263     );
264 #if CFG_SUPPORT_WAPI
265 int
266 mtk_cfg80211_testmode_set_key_ext(
267     IN struct wiphy *wiphy,
268     IN void *data,
269     IN int len
270     );
271 #endif
272 #else
273     #error "Please ENABLE kernel config (CONFIG_NL80211_TESTMODE) to support Wi-Fi Direct"
274 #endif
275
276
277 /*******************************************************************************
278 *                              F U N C T I O N S
279 ********************************************************************************
280 */
281
282 #endif /* _GL_CFG80211_H */
283