xref: /wlan-driver/qcacld-3.0/core/hdd/src/wlan_hdd_subnet_detect.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2015,2020 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 #ifndef __WLAN_HDD_SUBNET_DETECT_H
20 #define __WLAN_HDD_SUBNET_DETECT_H
21 
22 /**
23  * DOC: wlan_hdd_subnet_detect.h
24  *
25  * WLAN Host Device Driver subnet detect API specification
26  */
27 
28 #ifdef FEATURE_LFR_SUBNET_DETECTION
29 struct wiphy;
30 struct wireless_dev;
31 
32 /* QCA_NL80211_VENDOR_SUBCMD_GW_PARAM_CONFIG policy */
33 extern const struct nla_policy subnet_detect_policy[
34 			QCA_WLAN_VENDOR_ATTR_GW_PARAM_CONFIG_MAX + 1];
35 
36 #define FEATURE_LFR_SUBNET_DETECT_VENDOR_COMMANDS \
37 	{ \
38 		.info.vendor_id = QCA_NL80211_VENDOR_ID, \
39 		.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GW_PARAM_CONFIG, \
40 		.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
41 				WIPHY_VENDOR_CMD_NEED_NETDEV | \
42 				WIPHY_VENDOR_CMD_NEED_RUNNING, \
43 		.doit = wlan_hdd_cfg80211_set_gateway_params, \
44 		vendor_command_policy(subnet_detect_policy, \
45 				      QCA_WLAN_VENDOR_ATTR_GW_PARAM_CONFIG_MAX)\
46 	},
47 
48 int wlan_hdd_cfg80211_set_gateway_params(struct wiphy *wiphy,
49 	struct wireless_dev *wdev, const void *data, int data_len);
50 #endif /* FEATURE_LFR_SUBNET_DETECTION */
51 #endif /* __WLAN_HDD_SUBNET_DETECT_H */
52