xref: /wlan-driver/qcacld-3.0/core/hdd/src/wlan_hdd_peer_txq_flush.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 /**
18  * DOC: wlan_hdd_txq_flush.h
19  *
20  * WLAN Host Device Driver peer Tx queue flush config interface definitions
21  *
22  */
23 #ifndef WLAN_HDD_PEER_TXQ_FLUSH_H
24 #define WLAN_HDD_PEER_TXQ_FLUSH_H
25 #include "qdf_types.h"
26 #include "qdf_status.h"
27 #include "qca_vendor.h"
28 #include <net/cfg80211.h>
29 
30 #ifdef WLAN_FEATURE_PEER_TXQ_FLUSH_CONF
31 extern const struct nla_policy
32 peer_txq_flush_policy[QCA_WLAN_VENDOR_ATTR_FLUSH_PENDING_MAX + 1];
33 
34 /**
35  * wlan_hdd_cfg80211_peer_txq_flush_config() - Set peer tx queues flush config
36  * @wiphy: Wireless info object
37  * @wdev: Wireless dev object
38  * @attr: Command attributes
39  * @attr_len: Length of attributes
40  *
41  * Return: 0 on success, negative errno on failure
42  */
43 int wlan_hdd_cfg80211_peer_txq_flush_config(struct wiphy *wiphy,
44 					    struct wireless_dev *wdev,
45 					    const void *attr,
46 					    int attr_len);
47 
48 #define	FEATURE_PEER_FLUSH_VENDOR_COMMANDS \
49 { \
50 	.info.vendor_id = QCA_NL80211_VENDOR_ID, \
51 	.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_PEER_FLUSH_PENDING, \
52 	.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
53 		 WIPHY_VENDOR_CMD_NEED_NETDEV | \
54 		 WIPHY_VENDOR_CMD_NEED_RUNNING, \
55 	.doit = wlan_hdd_cfg80211_peer_txq_flush_config, \
56 	vendor_command_policy(peer_txq_flush_policy, \
57 	QCA_WLAN_VENDOR_ATTR_FLUSH_PENDING_MAX) \
58 },
59 #else /* WLAN_FEATURE_PEER_TXQ_FLUSH_CONF */
60 #define	FEATURE_PEER_FLUSH_VENDOR_COMMANDS
61 #endif /* WLAN_FEATURE_PEER_TXQ_FLUSH_CONF */
62 #endif /* WLAN_HDD_PEER_TXQ_FLUSH_H */
63