1 /*
2 * Copyright (c) 2012-2014, 2017-2019 The Linux Foundation. All rights reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18
19 #if !defined(WLAN_HDD_EXT_SCAN_H)
20 #define WLAN_HDD_EXT_SCAN_H
21
22 /**
23 * DOC: wlan_hdd_ext_scan.h
24 *
25 * WLAN Host Device Driver EXT SCAN feature implementation
26 *
27 */
28
29 struct hdd_context;
30
31 #define EXTSCAN_EVENT_BUF_SIZE 4096
32
33 #ifdef FEATURE_WLAN_EXTSCAN
34
35 #include "wlan_hdd_main.h"
36
37 /*
38 * Used to allocate the size of 4096 for the EXTScan NL data.
39 * The size of 4096 is considered assuming that all data per
40 * respective event fit with in the limit.Please take a call
41 * on the limit based on the data requirements.
42 */
43
44 int wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
45 struct wireless_dev *wdev,
46 const void *data, int data_len);
47
48 int wlan_hdd_cfg80211_extscan_stop(struct wiphy *wiphy,
49 struct wireless_dev *wdev,
50 const void *data, int data_len);
51
52 int wlan_hdd_cfg80211_extscan_get_capabilities(struct wiphy *wiphy,
53 struct wireless_dev *wdev,
54 const void *data, int data_len);
55
56 int wlan_hdd_cfg80211_extscan_get_cached_results(struct wiphy *wiphy,
57 struct wireless_dev
58 *wdev, const void *data,
59 int data_len);
60
61 int wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
62 struct wireless_dev
63 *wdev, const void *data,
64 int data_len);
65
66 int wlan_hdd_cfg80211_extscan_reset_bssid_hotlist(struct wiphy *wiphy,
67 struct wireless_dev
68 *wdev, const void *data,
69 int data_len);
70
71 int wlan_hdd_cfg80211_extscan_set_significant_change(struct wiphy *wiphy,
72 struct wireless_dev
73 *wdev, const void *data,
74 int data_len);
75
76 int wlan_hdd_cfg80211_extscan_reset_significant_change(struct wiphy
77 *wiphy,
78 struct
79 wireless_dev
80 *wdev, const void *data,
81 int data_len);
82
83 int wlan_hdd_cfg80211_set_epno_list(struct wiphy *wiphy,
84 struct wireless_dev *wdev,
85 const void *data,
86 int data_len);
87
88 int wlan_hdd_cfg80211_set_passpoint_list(struct wiphy *wiphy,
89 struct wireless_dev *wdev,
90 const void *data,
91 int data_len);
92
93 int wlan_hdd_cfg80211_reset_passpoint_list(struct wiphy *wiphy,
94 struct wireless_dev *wdev,
95 const void *data,
96 int data_len);
97
98 /**
99 * wlan_hdd_cfg80211_extscan_callback() - ext scan callback
100 * @hdd_handle: Opaque handle to hdd context
101 * @event_id: Event identifier
102 * @msg: Pointer to message
103 *
104 * Return: none
105 */
106 void wlan_hdd_cfg80211_extscan_callback(hdd_handle_t hdd_handle,
107 const uint16_t event_id, void *msg);
108
109 void wlan_hdd_cfg80211_extscan_init(struct hdd_context *hdd_ctx);
110
111 #else /* FEATURE_WLAN_EXTSCAN */
112
113 static inline
wlan_hdd_cfg80211_extscan_callback(hdd_handle_t hdd_handle,const uint16_t event_id,void * msg)114 void wlan_hdd_cfg80211_extscan_callback(hdd_handle_t hdd_handle,
115 const uint16_t event_id, void *msg)
116 {
117 }
118
wlan_hdd_cfg80211_extscan_init(struct hdd_context * hdd_ctx)119 static inline void wlan_hdd_cfg80211_extscan_init(struct hdd_context *hdd_ctx)
120 {
121 }
122
123 #endif /* End of FEATURE_WLAN_EXTSCAN */
124
125 #endif /* end #if !defined(WLAN_HDD_EXT_SCAN_H) */
126
127