xref: /wlan-driver/qcacld-3.0/os_if/interop_issues_ap/inc/wlan_cfg80211_interop_issues_ap.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2019-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 /**
20  * DOC: wlan_cfg80211_interop_issues_ap.h
21  *
22  * This Header file provide declaration for cfg80211 command handler API
23  */
24 
25 #ifndef __WLAN_CFG80211_INTEROP_ISSUES_AP_H__
26 #define __WLAN_CFG80211_INTEROP_ISSUES_AP_H__
27 
28 #include <wlan_objmgr_cmn.h>
29 #include <qdf_types.h>
30 #include <net/cfg80211.h>
31 #include <qca_vendor.h>
32 
33 #ifdef WLAN_FEATURE_INTEROP_ISSUES_AP
34 
35 extern const struct nla_policy
36 	interop_issues_ap_policy
37 	[QCA_WLAN_VENDOR_ATTR_INTEROP_ISSUES_AP_MAX + 1];
38 
39 #define FEATURE_INTEROP_ISSUES_AP_VENDOR_COMMANDS \
40 { \
41 	.info.vendor_id = QCA_NL80211_VENDOR_ID, \
42 	.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_INTEROP_ISSUES_AP, \
43 	.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
44 		 WIPHY_VENDOR_CMD_NEED_NETDEV | \
45 		 WIPHY_VENDOR_CMD_NEED_RUNNING, \
46 	.doit = wlan_cfg80211_set_interop_issues_ap_config, \
47 	vendor_command_policy(interop_issues_ap_policy, \
48 			      QCA_WLAN_VENDOR_ATTR_INTEROP_ISSUES_AP_MAX) \
49 },
50 
51 #define FEATURE_INTEROP_ISSUES_AP_VENDOR_COMMANDS_INDEX \
52 	[QCA_NL80211_VENDOR_SUBCMD_INTEROP_ISSUES_AP_INDEX] = { \
53 		.vendor_id = QCA_NL80211_VENDOR_ID, \
54 		.subcmd = QCA_NL80211_VENDOR_SUBCMD_INTEROP_ISSUES_AP \
55 	},
56 
57 /**
58  * wlan_cfg80211_init_interop_issues_ap() - init interop issues ap setting
59  * @pdev: the pointer of pdev object
60  *
61  * Return: none
62  */
63 void wlan_cfg80211_init_interop_issues_ap(struct wlan_objmgr_pdev *pdev);
64 
65 /**
66  * wlan_cfg80211_set_interop_issues_ap_config() - set interop issues ap config
67  * @wiphy: pointer to wireless wiphy structure
68  * @wdev: pointer to wireless_dev structure
69  * @data: Pointer to the data to be passed via vendor interface
70  * @data_len: Length of the data to be passed
71  *
72  * Return: Return the Success or Failure code
73  */
74 int wlan_cfg80211_set_interop_issues_ap_config(struct wiphy *wiphy,
75 					       struct wireless_dev *wdev,
76 					       const void *data, int data_len);
77 #else
78 static inline
wlan_cfg80211_init_interop_issues_ap(struct wlan_objmgr_pdev * pdev)79 void wlan_cfg80211_init_interop_issues_ap(struct wlan_objmgr_pdev *pdev) {}
80 #define FEATURE_INTEROP_ISSUES_AP_VENDOR_COMMANDS
81 #define FEATURE_INTEROP_ISSUES_AP_VENDOR_COMMANDS_INDEX
82 #endif
83 #endif /* __WLAN_CFG80211_INTEROP_ISSUES_AP_H__ */
84