add rk3288 pinctrl dts code
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / mt5931_kk / drv_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 * Copyright (c) 2007 MediaTek Inc.
11 *
12 * All rights reserved. Copying, compilation, modification, distribution
13 * or any other use whatsoever of this material is strictly prohibited
14 * except in accordance with a Software License Agreement with
15 * MediaTek Inc.
16 ********************************************************************************
17 */
18
19 /*******************************************************************************
20 * LEGAL DISCLAIMER
21 *
22 * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND
23 * AGREES THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK
24 * SOFTWARE") RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE
25 * PROVIDED TO BUYER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY
26 * DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
27 * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
28 * PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE
29 * ANY WARRANTY WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY
30 * WHICH MAY BE USED BY, INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK
31 * SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY
32 * WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE
33 * FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S SPECIFICATION OR TO
34 * CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
35 *
36 * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
37 * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL
38 * BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT
39 * ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY
40 * BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
41 *
42 * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
43 * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT
44 * OF LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING
45 * THEREOF AND RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN
46 * FRANCISCO, CA, UNDER THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE
47 * (ICC).
48 ********************************************************************************
49 */
50
51 /*
52 ** $Log: gl_cfg80211.h $
53 ** 
54 ** 08 24 2012 cp.wu
55 ** [WCXRP00001269] [MT6620 Wi-Fi][Driver] cfg80211 porting merge back to DaVinci
56 ** .
57  *
58 */
59
60 #ifndef _GL_CFG80211_H
61 #define _GL_CFG80211_H
62
63 /*******************************************************************************
64 *                         C O M P I L E R   F L A G S
65 ********************************************************************************
66 */
67
68 /*******************************************************************************
69 *                    E X T E R N A L   R E F E R E N C E S
70 ********************************************************************************
71 */
72 #include <linux/kernel.h>
73 #include <linux/netdevice.h>
74 #include <linux/wireless.h>
75 #include <linux/ieee80211.h>
76 #include <net/cfg80211.h>
77
78 #include "gl_os.h"
79
80 /*******************************************************************************
81 *                              C O N S T A N T S
82 ********************************************************************************
83 */
84
85 /*******************************************************************************
86 *                             D A T A   T Y P E S
87 ********************************************************************************
88 */
89
90 /*******************************************************************************
91 *                            P U B L I C   D A T A
92 ********************************************************************************
93 */
94
95 /*******************************************************************************
96 *                           P R I V A T E   D A T A
97 ********************************************************************************
98 */
99
100 /*******************************************************************************
101 *                                 M A C R O S
102 ********************************************************************************
103 */
104
105 /*******************************************************************************
106 *                  F U N C T I O N   D E C L A R A T I O N S
107 ********************************************************************************
108 */
109 /* cfg80211 hooks */
110 int 
111 mtk_cfg80211_change_iface (
112     struct wiphy *wiphy,
113     struct net_device *ndev,
114     enum nl80211_iftype type,
115     u32 *flags,
116     struct vif_params *params
117     );
118
119
120 int
121 mtk_cfg80211_add_key (
122     struct wiphy *wiphy,
123     struct net_device *ndev,
124     u8 key_index,
125     bool pairwise,
126     const u8 *mac_addr,
127     struct key_params *params
128     );
129
130
131 int 
132 mtk_cfg80211_get_key (
133     struct wiphy *wiphy,
134     struct net_device *ndev,
135     u8 key_index,
136     bool pairwise,
137     const u8 *mac_addr,
138     void *cookie,
139     void (*callback)(void *cookie, struct key_params*)
140     );
141
142
143 int
144 mtk_cfg80211_del_key (
145     struct wiphy *wiphy,
146     struct net_device *ndev,
147     u8 key_index,
148     bool pairwise,
149     const u8 *mac_addr
150     );
151
152
153 int 
154 mtk_cfg80211_set_default_key (
155     struct wiphy *wiphy,
156     struct net_device *ndev,
157     u8 key_index,
158     bool unicast,
159     bool multicast
160     );
161
162
163 int
164 mtk_cfg80211_get_station (
165     struct wiphy *wiphy,
166     struct net_device *ndev,
167     u8 *mac,
168     struct station_info *sinfo
169     );
170
171
172 int 
173 mtk_cfg80211_scan (
174     struct wiphy *wiphy,
175     struct net_device *ndev,
176     struct cfg80211_scan_request *request
177     );
178
179
180 int
181 mtk_cfg80211_connect (
182     struct wiphy *wiphy,
183     struct net_device *ndev,
184     struct cfg80211_connect_params *sme
185     );
186
187
188 int 
189 mtk_cfg80211_disconnect (
190     struct wiphy *wiphy,
191     struct net_device *ndev,
192     u16 reason_code
193     );
194
195
196 int
197 mtk_cfg80211_join_ibss (
198     struct wiphy *wiphy,
199     struct net_device *ndev,
200     struct cfg80211_ibss_params *params
201     );
202
203
204 int
205 mtk_cfg80211_leave_ibss (
206     struct wiphy *wiphy,
207     struct net_device *ndev
208     );
209
210
211 int
212 mtk_cfg80211_set_power_mgmt (
213     struct wiphy *wiphy,
214     struct net_device *ndev,
215     bool enabled,
216     int timeout
217     );
218
219
220 int
221 mtk_cfg80211_set_pmksa (
222     struct wiphy *wiphy,
223     struct net_device *ndev,
224     struct cfg80211_pmksa *pmksa
225     );
226
227
228 int
229 mtk_cfg80211_del_pmksa (
230     struct wiphy *wiphy,
231     struct net_device *ndev,
232     struct cfg80211_pmksa *pmksa
233     );
234
235
236 int
237 mtk_cfg80211_flush_pmksa (
238     struct wiphy *wiphy,
239     struct net_device *ndev
240     );
241
242
243 int 
244 mtk_cfg80211_remain_on_channel (
245     struct wiphy *wiphy,
246     struct net_device *ndev,
247     struct ieee80211_channel *chan,
248     enum nl80211_channel_type channel_type,
249     unsigned int duration,
250     u64 *cookie
251     );
252
253
254 int
255 mtk_cfg80211_cancel_remain_on_channel (
256     struct wiphy *wiphy,
257     struct net_device *ndev,
258     u64 cookie
259     );
260
261
262 int
263 mtk_cfg80211_mgmt_tx (
264     struct wiphy *wiphy,
265     struct net_device *ndev,
266     struct ieee80211_channel *channel,
267     bool offscan,
268     enum nl80211_channel_type channel_type,
269     bool channel_type_valid,
270     unsigned int wait,
271     const u8 *buf,
272     size_t len,
273     bool no_cck,
274     bool dont_wait_for_ack,
275     u64 *cookie
276     );
277
278
279 int
280 mtk_cfg80211_mgmt_tx_cancel_wait (
281     struct wiphy *wiphy,
282     struct net_device *ndev,
283     u64 cookie
284     );
285
286 #if CONFIG_NL80211_TESTMODE
287 int
288 mtk_cfg80211_testmode_cmd(
289     IN struct wiphy *wiphy,
290     IN void *data,
291     IN int len
292     );
293
294 int
295 mtk_cfg80211_testmode_sw_cmd(
296     IN struct wiphy *wiphy,
297     IN void *data,
298     IN int len
299     );
300 #if CFG_SUPPORT_WAPI
301 int
302 mtk_cfg80211_testmode_set_key_ext(
303     IN struct wiphy *wiphy,
304     IN void *data,
305     IN int len
306     );
307 #endif
308 #else
309     #error "Please ENABLE kernel config (CONFIG_NL80211_TESTMODE) to support Wi-Fi Direct"
310 #endif
311
312
313 /*******************************************************************************
314 *                              F U N C T I O N S
315 ********************************************************************************
316 */
317
318 #endif /* _GL_CFG80211_H */
319