• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Header for Linux cfg80211 scan
4  *
5  * Copyright (C) 1999-2019, Broadcom.
6  *
7  *      Unless you and Broadcom execute a separate written software license
8  * agreement governing use of this software, this software is licensed to you
9  * under the terms of the GNU General Public License version 2 (the "GPL"),
10  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
11  * following added to such license:
12  *
13  *      As a special exception, the copyright holders of this software give you
14  * permission to link this software with independent modules, and to copy and
15  * distribute the resulting executable under terms of your choice, provided that
16  * you also meet, for each linked independent module, the terms and conditions of
17  * the license of that module.  An independent module is a module which is not
18  * derived from this software.  The special exception does not apply to any
19  * modifications of the software.
20  *
21  *      Notwithstanding the above, under no circumstances may you combine this
22  * software in any way with any other Broadcom software provided under a license
23  * other than the GPL, without Broadcom's express prior written consent.
24  *
25  *
26  * <<Broadcom-WL-IPTag/Open:>>
27  *
28  * $Id$
29  */
30 
31 #ifndef _wl_cfgscan_h_
32 #define _wl_cfgscan_h_
33 
34 #include <linux/wireless.h>
35 #include <typedefs.h>
36 #include <ethernet.h>
37 #include <wlioctl.h>
38 #include <linux/wireless.h>
39 #include <net/cfg80211.h>
40 #include <linux/rfkill.h>
41 #include <osl.h>
42 
43 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0))
44 #define GET_SCAN_WDEV(scan_request) \
45 	(scan_request && scan_request->dev) ? scan_request->dev->ieee80211_ptr : NULL;
46 #else
47 #define GET_SCAN_WDEV(scan_request) \
48 	scan_request ? scan_request->wdev : NULL;
49 #endif // endif
50 #ifdef WL_SCHED_SCAN
51 #define GET_SCHED_SCAN_WDEV(scan_request) \
52 	(scan_request && scan_request->dev) ? scan_request->dev->ieee80211_ptr : NULL;
53 #endif /* WL_SCHED_SCAN */
54 
55 extern s32 wl_escan_handler(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev,
56 	const wl_event_msg_t *e, void *data);
57 extern s32 wl_do_escan(struct bcm_cfg80211 *cfg, struct wiphy *wiphy,
58 	struct net_device *ndev, struct cfg80211_scan_request *request);
59 extern s32 __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
60 	struct cfg80211_scan_request *request, struct cfg80211_ssid *this_ssid);
61 #if defined(WL_CFG80211_P2P_DEV_IF)
62 extern s32 wl_cfg80211_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request);
63 #else
64 extern s32 wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
65 	struct cfg80211_scan_request *request);
66 extern int wl_cfg80211_scan_stop(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev);
67 #endif /* WL_CFG80211_P2P_DEV_IF */
68 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0))
69 extern void wl_cfg80211_abort_scan(struct wiphy *wiphy, struct wireless_dev *wdev);
70 #else
71 #ifdef CONFIG_AP6XXX_WIFI6_HDF
72 void
73 wl_cfg80211_abort_scan(struct wiphy *wiphy, struct wireless_dev *wdev);
74 #endif
75 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)) */
76 extern void wl_cfg80211_scan_abort(struct bcm_cfg80211 *cfg);
77 extern s32 wl_init_scan(struct bcm_cfg80211 *cfg);
78 extern int wl_cfg80211_scan_stop(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev);
79 extern s32 wl_notify_scan_status(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev,
80 	const wl_event_msg_t *e, void *data);
81 extern void wl_cfg80211_set_passive_scan(struct net_device *dev, char *command);
82 #ifdef PNO_SUPPORT
83 extern s32 wl_notify_pfn_status(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev,
84 	const wl_event_msg_t *e, void *data);
85 #endif /* PNO_SUPPORT */
86 #ifdef GSCAN_SUPPORT
87 extern s32 wl_notify_gscan_event(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev,
88 	const wl_event_msg_t *e, void *data);
89 #endif /* GSCAN_SUPPORT */
90 
91 #ifdef WL_SCHED_SCAN
92 extern int wl_cfg80211_sched_scan_start(struct wiphy *wiphy, struct net_device *dev,
93 	struct cfg80211_sched_scan_request *request);
94 #if (LINUX_VERSION_CODE > KERNEL_VERSION(4, 11, 0))
95 extern int wl_cfg80211_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev, u64 reqid);
96 #else
97 extern int wl_cfg80211_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev);
98 #endif /* LINUX_VER > 4.11 */
99 #endif /* WL_SCHED_SCAN */
100 extern void wl_notify_scan_done(struct bcm_cfg80211 *cfg, bool aborted);
101 #endif /* _wl_cfgscan_h_ */
102