xref: /wlan-driver/qcacld-3.0/core/hdd/src/wlan_hdd_hw_capability.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_hdd_hw_capability.h
21  *
22  * Add Vendor subcommand QCA_NL80211_VENDOR_SUBCMD_GET_HW_CAPABILITY
23  */
24 
25 #ifndef __WLAN_HDD_HW_CAPABILITY_H
26 #define __WLAN_HDD_HW_CAPABILITY_H
27 
28 #ifdef FEATURE_HW_CAPABILITY
29 #include <net/cfg80211.h>
30 
31 /**
32  * wlan_hdd_cfg80211_get_hw_capability() - get hardware capability
33  * @wiphy: wiphy device pointer
34  * @wdev: wireless device pointer
35  * @data: Vendor command data buffer
36  * @data_len: Buffer length
37  *
38  * Return: 0 on success; error number otherwise.
39  */
40 int wlan_hdd_cfg80211_get_hw_capability(struct wiphy *wiphy,
41 					struct wireless_dev *wdev,
42 					const void *data,
43 					int data_len);
44 
45 #define FEATURE_HW_CAPABILITY_COMMANDS					\
46 {									\
47 	.info.vendor_id = QCA_NL80211_VENDOR_ID,			\
48 	.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_HW_CAPABILITY,	\
49 	.flags = WIPHY_VENDOR_CMD_NEED_WDEV |				\
50 		WIPHY_VENDOR_CMD_NEED_NETDEV |				\
51 		WIPHY_VENDOR_CMD_NEED_RUNNING,				\
52 	.doit = wlan_hdd_cfg80211_get_hw_capability,			\
53 	vendor_command_policy(VENDOR_CMD_RAW_DATA, 0)			\
54 },
55 #else /* FEATURE_HW_CAPABILITY */
56 #define FEATURE_HW_CAPABILITY_COMMANDS
57 #endif /* FEATURE_HW_CAPABILITY */
58 
59 #endif /* __WLAN_HDD_HW_CAPABILITY_H */
60