xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/nxp/mlinux/moal_cfg80211.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /** @file moal_cfg80211.h
2  *
3  * @brief This file contains the CFG80211 specific defines.
4  *
5  *
6  * Copyright 2011-2022 NXP
7  *
8  * This software file (the File) is distributed by NXP
9  * under the terms of the GNU General Public License Version 2, June 1991
10  * (the License).  You may use, redistribute and/or modify the File in
11  * accordance with the terms and conditions of the License, a copy of which
12  * is available by writing to the Free Software Foundation, Inc.,
13  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
14  * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
15  *
16  * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
17  * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
18  * ARE EXPRESSLY DISCLAIMED.  The License provides additional details about
19  * this warranty disclaimer.
20  *
21  */
22 
23 #ifndef _MOAL_CFG80211_H_
24 #define _MOAL_CFG80211_H_
25 
26 #include "moal_main.h"
27 
28 #if KERNEL_VERSION(3, 14, 0) <= CFG80211_VERSION_CODE
29 #define IEEE80211_CHAN_PASSIVE_SCAN IEEE80211_CHAN_NO_IR
30 #define IEEE80211_CHAN_NO_IBSS IEEE80211_CHAN_NO_IR
31 #endif
32 
33 #if KERNEL_VERSION(3, 16, 0) <= CFG80211_VERSION_CODE
34 #define MAX_CSA_COUNTERS_NUM 2
35 #endif
36 
37 /* Clear all key indexes */
38 #define KEY_INDEX_CLEAR_ALL (0x0000000F)
39 
40 /** RTS/FRAG disabled value */
41 #define MLAN_FRAG_RTS_DISABLED (0xFFFFFFFF)
42 
43 #ifndef WLAN_CIPHER_SUITE_SMS4
44 #define WLAN_CIPHER_SUITE_SMS4 0x00000020
45 #endif
46 
47 #ifndef WLAN_CIPHER_SUITE_AES_CMAC
48 #define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06
49 #endif
50 #if KERNEL_VERSION(4, 0, 0) <= CFG80211_VERSION_CODE
51 #ifndef WLAN_CIPHER_SUITE_BIP_GMAC_128
52 #define WLAN_CIPHER_SUITE_BIP_GMAC_128 0x000FAC0B
53 #endif
54 #ifndef WLAN_CIPHER_SUITE_BIP_GMAC_256
55 #define WLAN_CIPHER_SUITE_BIP_GMAC_256 0x000FAC0C
56 #endif
57 #endif
58 
59 /* define for custom ie operation */
60 #define MLAN_CUSTOM_IE_AUTO_IDX_MASK 0xffff
61 #define MLAN_CUSTOM_IE_NEW_MASK 0x8000
62 #define IE_MASK_WPS 0x0001
63 #define IE_MASK_P2P 0x0002
64 #define IE_MASK_WFD 0x0004
65 #define IE_MASK_VENDOR 0x0008
66 #define IE_MASK_EXTCAP 0x0010
67 
68 #define MRVL_PKT_TYPE_MGMT_FRAME 0xE5
69 
70 mlan_status woal_cfg80211_set_key(moal_private *priv, t_u8 is_enable_wep,
71 				  t_u32 cipher, const t_u8 *key, int key_len,
72 				  const t_u8 *seq, int seq_len, t_u8 key_index,
73 				  const t_u8 *addr, int disable,
74 				  t_u8 wait_option);
75 
76 mlan_status woal_cfg80211_set_wep_keys(moal_private *priv, const t_u8 *key,
77 				       int key_len, t_u8 index,
78 				       t_u8 wait_option);
79 
80 t_u8 is_cfg80211_special_region_code(t_u8 *region_string);
81 
82 /**
83  * If multiple wiphys are registered e.g. a regular netdev with
84  * assigned ieee80211_ptr and you won't know whether it points
85  * to a wiphy your driver has registered or not. Assign this to
86  * something global to your driver to help determine whether
87  * you own this wiphy or not.
88  */
89 static const void *const mrvl_wiphy_privid = &mrvl_wiphy_privid;
90 
91 /* Get the private structure from wiphy */
92 void *woal_get_wiphy_priv(struct wiphy *wiphy);
93 
94 /* Get the private structure from net device */
95 void *woal_get_netdev_priv(struct net_device *dev);
96 #ifdef STA_SUPPORT
97 /** get scan interface */
98 pmoal_private woal_get_scan_interface(pmoal_handle handle);
99 #if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
100 /** AUTH pending flag */
101 #define HOST_MLME_AUTH_PENDING MBIT(0)
102 /** AUTH complete flag */
103 #define HOST_MLME_AUTH_DONE MBIT(1)
104 #define HOST_MLME_ASSOC_PENDING MBIT(2)
105 #define HOST_MLME_ASSOC_DONE MBIT(3)
106 void woal_host_mlme_disconnect(pmoal_private priv, u16 reason_code, u8 *sa);
107 void woal_host_mlme_work_queue(struct work_struct *work);
108 void woal_host_mlme_process_assoc_resp(moal_private *priv,
109 				       mlan_ds_assoc_info *assoc_info);
110 #endif
111 #endif
112 
113 #if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
114 void woal_regulatory_work_queue(struct work_struct *work);
115 #endif
116 
117 t_u8 woal_band_cfg_to_ieee_band(t_u32 band);
118 t_u8 woal_ieee_band_to_radio_type(t_u8 ieee_band);
119 
120 int woal_cfg80211_change_virtual_intf(struct wiphy *wiphy,
121 				      struct net_device *dev,
122 				      enum nl80211_iftype type,
123 #if KERNEL_VERSION(4, 12, 0) > CFG80211_VERSION_CODE
124 				      u32 *flags,
125 #endif
126 				      struct vif_params *params);
127 
128 int woal_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed);
129 
130 int woal_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
131 #if (CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || IMX_ANDROID_13)
132 			  int link_id,
133 #endif
134 			  t_u8 key_index,
135 #if KERNEL_VERSION(2, 6, 36) < CFG80211_VERSION_CODE
136 			  bool pairwise,
137 #endif
138 			  const t_u8 *mac_addr, struct key_params *params);
139 
140 int woal_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
141 #if (CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || IMX_ANDROID_13)
142 			  int link_id,
143 #endif
144 			  t_u8 key_index,
145 #if KERNEL_VERSION(2, 6, 36) < CFG80211_VERSION_CODE
146 			  bool pairwise,
147 #endif
148 			  const t_u8 *mac_addr);
149 #ifdef STA_SUPPORT
150 /** Opportunistic Key Caching APIs support */
151 struct pmksa_entry *woal_get_pmksa_entry(pmoal_private priv, const u8 *bssid);
152 
153 int woal_flush_pmksa_list(moal_private *priv);
154 
155 int woal_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *dev,
156 			    struct cfg80211_pmksa *pmksa);
157 
158 int woal_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *dev,
159 			    struct cfg80211_pmksa *pmksa);
160 
161 int woal_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_device *dev);
162 #endif
163 
164 int woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev,
165 #if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
166 				   unsigned int link_id,
167 #endif
168 				   const u8 *peer,
169 				   const struct cfg80211_bitrate_mask *mask);
170 #if KERNEL_VERSION(2, 6, 38) <= CFG80211_VERSION_CODE
171 int woal_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant);
172 int woal_cfg80211_get_antenna(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant);
173 #endif
174 
175 #if KERNEL_VERSION(3, 14, 0) <= CFG80211_VERSION_CODE
176 int woal_cfg80211_set_qos_map(struct wiphy *wiphy, struct net_device *dev,
177 			      struct cfg80211_qos_map *qos_map);
178 #endif
179 
180 #ifdef STA_CFG80211
181 #ifdef STA_SUPPORT
182 int woal_set_rf_channel(moal_private *priv, struct ieee80211_channel *chan,
183 			enum nl80211_channel_type channel_type,
184 			t_u8 wait_option);
185 
woal_cfg80211_scan_done(struct cfg80211_scan_request * request,bool aborted)186 static inline int woal_cfg80211_scan_done(struct cfg80211_scan_request *request,
187 					  bool aborted)
188 {
189 #if KERNEL_VERSION(4, 8, 0) <= CFG80211_VERSION_CODE
190 	struct cfg80211_scan_info info;
191 
192 	info.aborted = aborted;
193 	cfg80211_scan_done(request, &info);
194 #else
195 	cfg80211_scan_done(request, aborted);
196 #endif
197 	return 0;
198 }
199 mlan_status woal_inform_bss_from_scan_result(moal_private *priv,
200 					     pmlan_ssid_bssid ssid_bssid,
201 					     t_u8 wait_option);
202 #endif
203 #endif
204 
205 #if KERNEL_VERSION(3, 5, 0) > CFG80211_VERSION_CODE
206 int woal_cfg80211_set_channel(struct wiphy *wiphy,
207 #if KERNEL_VERSION(2, 6, 34) < CFG80211_VERSION_CODE
208 			      struct net_device *dev,
209 #endif
210 			      struct ieee80211_channel *chan,
211 			      enum nl80211_channel_type channel_type);
212 #endif
213 
214 #if KERNEL_VERSION(2, 6, 37) < CFG80211_VERSION_CODE
215 int woal_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *dev,
216 #if (CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || IMX_ANDROID_13)
217 				  int link_id,
218 #endif
219 				  t_u8 key_index, bool ucast, bool mcast);
220 #else
221 int woal_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *dev,
222 				  t_u8 key_index);
223 #endif
224 
225 #if KERNEL_VERSION(2, 6, 30) <= CFG80211_VERSION_CODE
226 int woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
227 				       struct net_device *netdev,
228 #if (CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || IMX_ANDROID_13)
229 				       int link_id,
230 #endif
231 				       t_u8 key_index);
232 #endif
233 
234 #if KERNEL_VERSION(5, 10, 0) <= CFG80211_VERSION_CODE
235 int woal_cfg80211_set_default_beacon_key(struct wiphy *wiphy,
236 					 struct net_device *netdev,
237 #if (CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || IMX_ANDROID_13)
238 					 int link_id,
239 #endif
240 					 t_u8 key_index);
241 #endif
242 
243 #if KERNEL_VERSION(3, 1, 0) <= CFG80211_VERSION_CODE
244 int woal_cfg80211_set_rekey_data(struct wiphy *wiphy, struct net_device *dev,
245 				 struct cfg80211_gtk_rekey_data *data);
246 #endif
247 void woal_mgmt_frame_register(moal_private *priv, u16 frame_type, bool reg);
248 void woal_cfg80211_mgmt_frame_register(struct wiphy *wiphy,
249 #if KERNEL_VERSION(3, 6, 0) <= CFG80211_VERSION_CODE
250 				       struct wireless_dev *wdev,
251 #else
252 				       struct net_device *dev,
253 #endif
254 #if KERNEL_VERSION(5, 8, 0) <= CFG80211_VERSION_CODE
255 				       struct mgmt_frame_regs *upd
256 #else
257 				       t_u16 frame_type, bool reg
258 #endif
259 );
260 
261 int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
262 #if KERNEL_VERSION(3, 6, 0) <= CFG80211_VERSION_CODE
263 			  struct wireless_dev *wdev,
264 #else
265 			  struct net_device *dev,
266 #endif
267 #if KERNEL_VERSION(3, 14, 0) <= CFG80211_VERSION_CODE
268 			  struct cfg80211_mgmt_tx_params *params,
269 #else
270 			  struct ieee80211_channel *chan, bool offchan,
271 #if KERNEL_VERSION(3, 8, 0) > CFG80211_VERSION_CODE
272 			  enum nl80211_channel_type channel_type,
273 			  bool channel_type_valid,
274 #endif
275 			  unsigned int wait, const u8 *buf, size_t len,
276 #if KERNEL_VERSION(3, 2, 0) <= CFG80211_VERSION_CODE
277 			  bool no_cck,
278 #endif
279 #if KERNEL_VERSION(3, 3, 0) <= CFG80211_VERSION_CODE
280 			  bool dont_wait_for_ack,
281 #endif
282 #endif
283 			  u64 *cookie);
284 
285 mlan_status woal_register_cfg80211(moal_private *priv);
286 
287 extern struct ieee80211_supported_band cfg80211_band_2ghz;
288 extern struct ieee80211_supported_band cfg80211_band_5ghz;
289 extern struct ieee80211_supported_band mac1_cfg80211_band_2ghz;
290 extern struct ieee80211_supported_band mac1_cfg80211_band_5ghz;
291 
292 #if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
293 int woal_cfg80211_bss_role_cfg(moal_private *priv, t_u16 action,
294 			       t_u8 *bss_role);
295 #endif
296 
297 #ifdef UAP_SUPPORT
298 void woal_cancel_cac(moal_private *priv);
299 #endif
300 
301 #if KERNEL_VERSION(4, 1, 0) <= CFG80211_VERSION_CODE
302 struct wireless_dev *
303 woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, const char *name,
304 			       unsigned char name_assign_type,
305 			       enum nl80211_iftype type,
306 #if KERNEL_VERSION(4, 12, 0) > CFG80211_VERSION_CODE
307 			       u32 *flags,
308 #endif
309 			       struct vif_params *params);
310 #else
311 #if KERNEL_VERSION(3, 7, 0) <= CFG80211_VERSION_CODE
312 struct wireless_dev *woal_cfg80211_add_virtual_intf(struct wiphy *wiphy,
313 						    const char *name,
314 						    enum nl80211_iftype type,
315 						    u32 *flags,
316 						    struct vif_params *params);
317 #else
318 #if KERNEL_VERSION(3, 6, 0) <= CFG80211_VERSION_CODE
319 struct wireless_dev *woal_cfg80211_add_virtual_intf(struct wiphy *wiphy,
320 						    char *name,
321 						    enum nl80211_iftype type,
322 						    u32 *flags,
323 						    struct vif_params *params);
324 #else
325 #if KERNEL_VERSION(2, 6, 37) < CFG80211_VERSION_CODE
326 struct net_device *woal_cfg80211_add_virtual_intf(struct wiphy *wiphy,
327 						  char *name,
328 						  enum nl80211_iftype type,
329 						  u32 *flags,
330 						  struct vif_params *params);
331 #else
332 int woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, char *name,
333 				   enum nl80211_iftype type, u32 *flags,
334 				   struct vif_params *params);
335 #endif
336 #endif
337 #endif
338 #endif
339 int woal_cfg80211_del_virt_if(struct wiphy *wiphy, struct net_device *dev);
340 #if KERNEL_VERSION(3, 6, 0) <= CFG80211_VERSION_CODE
341 int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy,
342 				   struct wireless_dev *wdev);
343 #else
344 int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy, struct net_device *dev);
345 #endif
346 
347 void woal_remove_virtual_interface(moal_handle *handle);
348 
349 #ifdef WIFI_DIRECT_SUPPORT
350 /* Group Owner Negotiation Req */
351 #define P2P_GO_NEG_REQ 0
352 /* Group Owner Negotiation Rsp */
353 #define P2P_GO_NEG_RSP 1
354 /* Group Owner Negotiation Confirm */
355 #define P2P_GO_NEG_CONF 2
356 /* P2P Invitation Request */
357 #define P2P_INVITE_REQ 3
358 /* P2P Invitation Response */
359 #define P2P_INVITE_RSP 4
360 /* Device Discoverability Request */
361 #define P2P_DEVDIS_REQ 5
362 /* Device Discoverability Response */
363 #define P2P_DEVDIS_RSP 6
364 /* Provision Discovery Request */
365 #define P2P_PROVDIS_REQ 7
366 /* Provision Discovery Response */
367 #define P2P_PROVDIS_RSP 8
368 /** P2P category */
369 #define P2P_ACT_FRAME_CATEGORY 0x04
370 /** P2P oui offset */
371 #define P2P_ACT_FRAME_OUI_OFFSET 26
372 /** P2P subtype offset */
373 #define P2P_ACT_FRAME_OUI_SUBTYPE_OFFSET 30
374 void woal_cfg80211_display_p2p_actframe(const t_u8 *buf, int len,
375 					struct ieee80211_channel *chan,
376 					const t_u8 flag);
377 
378 /** Define kernel version for wifi direct */
379 #define WIFI_DIRECT_KERNEL_VERSION KERNEL_VERSION(2, 6, 39)
380 
381 #if CFG80211_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION
382 
383 int woal_cfg80211_init_p2p_client(moal_private *priv);
384 
385 int woal_cfg80211_init_p2p_go(moal_private *priv);
386 
387 int woal_cfg80211_deinit_p2p(moal_private *priv);
388 #endif /* KERNEL_VERSION */
389 #endif /* WIFI_DIRECT_SUPPORT */
390 
391 /** Define for remain on channel duration timer */
392 #define MAX_REMAIN_ON_CHANNEL_DURATION (5000)
393 
394 int woal_cfg80211_remain_on_channel_cfg(moal_private *priv, t_u8 wait_option,
395 					t_u8 remove, t_u8 *status,
396 					struct ieee80211_channel *chan,
397 					enum mlan_channel_type channel_type,
398 					t_u32 duration);
399 
400 #ifdef UAP_CFG80211
401 int woal_uap_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
402 #if KERNEL_VERSION(3, 16, 0) <= CFG80211_VERSION_CODE
403 				  const u8 *mac,
404 #else
405 				  u8 *mac,
406 #endif
407 				  struct station_info *stainfo);
408 
409 int woal_uap_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *dev,
410 				   int idx, t_u8 *mac,
411 				   struct station_info *sinfo);
412 #if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
413 int woal_cfg80211_change_bss(struct wiphy *wiphy, struct net_device *dev,
414 			     struct bss_parameters *params);
415 #endif
416 #if KERNEL_VERSION(3, 9, 0) <= CFG80211_VERSION_CODE
417 int woal_cfg80211_set_mac_acl(struct wiphy *wiphy, struct net_device *dev,
418 			      const struct cfg80211_acl_data *params);
419 #endif
420 #if KERNEL_VERSION(3, 1, 0) <= CFG80211_VERSION_CODE
421 int woal_cfg80211_set_txq_params(struct wiphy *wiphy, struct net_device *dev,
422 				 struct ieee80211_txq_params *params);
423 #endif
424 
425 #if KERNEL_VERSION(3, 12, 0) <= CFG80211_VERSION_CODE
426 int woal_cfg80211_set_coalesce(struct wiphy *wiphy,
427 			       struct cfg80211_coalesce *coalesce);
428 #endif
429 
430 #if KERNEL_VERSION(3, 4, 0) <= CFG80211_VERSION_CODE
431 int woal_cfg80211_add_beacon(struct wiphy *wiphy, struct net_device *dev,
432 			     struct cfg80211_ap_settings *params);
433 
434 int woal_cfg80211_set_beacon(struct wiphy *wiphy, struct net_device *dev,
435 			     struct cfg80211_beacon_data *params);
436 #else
437 int woal_cfg80211_add_beacon(struct wiphy *wiphy, struct net_device *dev,
438 			     struct beacon_parameters *params);
439 
440 int woal_cfg80211_set_beacon(struct wiphy *wiphy, struct net_device *dev,
441 			     struct beacon_parameters *params);
442 #endif
443 
444 #if ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13)
445 int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev,
446 			     unsigned int link_id);
447 #else
448 int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev);
449 #endif
450 int woal_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
451 #if KERNEL_VERSION(3, 19, 0) <= CFG80211_VERSION_CODE
452 			      struct station_del_parameters *param);
453 #else
454 #if KERNEL_VERSION(3, 16, 0) <= CFG80211_VERSION_CODE
455 			      const u8 *mac_addr);
456 #else
457 			      u8 *mac_addr);
458 #endif
459 #endif
460 
461 #if KERNEL_VERSION(3, 12, 0) <= CFG80211_VERSION_CODE
462 #if KERNEL_VERSION(3, 15, 0) <= CFG80211_VERSION_CODE
463 int woal_cfg80211_start_radar_detection(struct wiphy *wiphy,
464 					struct net_device *dev,
465 					struct cfg80211_chan_def *chandef,
466 					u32 cac_time_ms);
467 #else
468 int woal_cfg80211_start_radar_detection(struct wiphy *wiphy,
469 					struct net_device *dev,
470 					struct cfg80211_chan_def *chandef);
471 #endif
472 
473 int woal_cfg80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
474 				 struct cfg80211_csa_settings *params);
475 
476 void woal_process_cancel_chanrpt_event(moal_private *priv);
477 
478 void woal_cac_timer_func(void *context);
479 void woal_csa_work_queue(struct work_struct *work);
480 #endif
481 #endif /* UAP_CFG80211 */
482 #if defined(UAP_CFG80211) || defined(STA_CFG80211)
483 #if KERNEL_VERSION(3, 5, 0) <= CFG80211_VERSION_CODE
484 void woal_cfg80211_notify_channel(moal_private *priv,
485 				  chan_band_info *pchan_info);
486 void woal_channel_switch_event(moal_private *priv, chan_band_info *pchan_info);
487 #endif
488 #endif
489 
490 #ifdef STA_CFG80211
491 #if KERNEL_VERSION(3, 2, 0) <= CFG80211_VERSION_CODE
492 void woal_bgscan_stop_event(moal_private *priv);
493 void woal_cfg80211_notify_sched_scan_stop(moal_private *priv);
494 void woal_report_sched_scan_result(moal_private *priv);
495 #endif
496 #endif
497 
498 #if defined(UAP_CFG80211) || defined(STA_CFG80211)
499 
500 void woal_cfg80211_notify_antcfg(moal_private *priv, struct wiphy *wiphy,
501 				 mlan_ds_radio_cfg *radio);
502 #endif
503 
504 #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
505 void woal_deauth_event(moal_private *priv, int reason_code);
506 #endif
507 
508 #if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
509 mlan_status woal_chandef_create(moal_private *priv,
510 				struct cfg80211_chan_def *chandef,
511 				chan_band_info *pchan_info);
512 #endif
513 
514 #if KERNEL_VERSION(4, 20, 0) <= CFG80211_VERSION_CODE
515 void woal_cfg80211_setup_he_cap(moal_private *priv,
516 				struct ieee80211_supported_band *band);
517 #endif
518 
519 void woal_cfg80211_free_bands(struct wiphy *wiphy);
520 struct ieee80211_supported_band *woal_setup_wiphy_bands(t_u8 ieee_band);
521 
522 void woal_clear_all_mgmt_ies(moal_private *priv, t_u8 wait_option);
523 int woal_cfg80211_mgmt_frame_ie(
524 	moal_private *priv, const t_u8 *beacon_ies, size_t beacon_ies_len,
525 	const t_u8 *proberesp_ies, size_t proberesp_ies_len,
526 	const t_u8 *assocresp_ies, size_t assocresp_ies_len,
527 	const t_u8 *probereq_ies, size_t probereq_ies_len, t_u16 mask,
528 	t_u8 wait_option);
529 
530 int woal_get_active_intf_freq(moal_private *priv);
531 
532 void woal_cfg80211_setup_ht_cap(struct ieee80211_sta_ht_cap *ht_info,
533 				t_u32 dev_cap, t_u8 *mcs_set);
534 #if KERNEL_VERSION(3, 6, 0) <= CFG80211_VERSION_CODE
535 void woal_cfg80211_setup_vht_cap(moal_private *priv,
536 				 struct ieee80211_sta_vht_cap *vht_cap);
537 #endif
538 int woal_cfg80211_assoc(moal_private *priv, void *sme, t_u8 wait_option,
539 			pmlan_ds_misc_assoc_rsp assoc_rsp);
540 
541 void woal_clear_wiphy_dfs_state(struct wiphy *wiphy);
542 void woal_update_channel_dfs_state(t_u8 channel, t_u8 dfs_state);
543 int woal_get_wiphy_chan_dfs_state(struct wiphy *wiphy,
544 				  mlan_ds_11h_chan_dfs_state *ch_dfs_state);
545 #endif /* _MOAL_CFG80211_H_ */
546