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