xref: /wlan-driver/qcacld-3.0/core/hdd/inc/wlan_hdd_ll_lt_sap.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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: contains ll_lt_sap_declarations specific to the ll_lt_sap module
21  */
22 
23 #ifndef __WLAN_HDD_LL_LT_SAP_H
24 #define __WLAN_HDD_LL_LT_SAP_H
25 
26 #include "wlan_hdd_main.h"
27 #include "qca_vendor.h"
28 
29 extern const struct nla_policy
30 	wlan_hdd_ll_lt_sap_transport_switch_policy
31 	[QCA_WLAN_VENDOR_ATTR_AUDIO_TRANSPORT_SWITCH_MAX + 1];
32 
33 #define FEATURE_LL_LT_SAP_VENDOR_COMMANDS				      \
34 {									      \
35 	.info.vendor_id = QCA_NL80211_VENDOR_ID,			      \
36 	.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_AUDIO_TRANSPORT_SWITCH,      \
37 	.flags = WIPHY_VENDOR_CMD_NEED_WDEV |				      \
38 			WIPHY_VENDOR_CMD_NEED_NETDEV |			      \
39 			WIPHY_VENDOR_CMD_NEED_RUNNING,			      \
40 	.doit = wlan_hdd_cfg80211_ll_lt_sap_transport_switch,		      \
41 	vendor_command_policy(wlan_hdd_ll_lt_sap_transport_switch_policy,     \
42 			      QCA_WLAN_VENDOR_ATTR_AUDIO_TRANSPORT_SWITCH_MAX)\
43 },
44 
45 /**
46  * wlan_hdd_cfg80211_ll_lt_sap_transport_switch() - Request to switch the
47  * transport
48  * @wiphy:   pointer to wireless wiphy structure.
49  * @wdev:    pointer to wireless_dev structure.
50  * @data:    Pointer to the data to be passed via vendor interface
51  * @data_len:Length of the data to be passed
52  *
53  * Return:   Return the Success or Failure code.
54  */
55 int wlan_hdd_cfg80211_ll_lt_sap_transport_switch(struct wiphy *wiphy,
56 						 struct wireless_dev *wdev,
57 						 const void *data,
58 						 int data_len);
59 
60 #endif /* __WLAN_HDD_LL_LT_SAP_H */
61