xref: /wlan-dirver/qca-wifi-host-cmn/dp/inc/cdp_txrx_pflow.h (revision 2f4b444fb7e689b83a4ab0e7b3b38f0bf4def8e0)
1 /*
2  * Copyright (c) 2016-2017,2019-2021 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  * @file cdp_txrx_pflow.h
21  * @brief Define the host data path peer flow API functions
22  * called by the host control SW and the OS interface module
23  */
24 #ifndef _CDP_TXRX_PFLOW_H_
25 #define _CDP_TXRX_PFLOW_H_
26 
27 #include <cdp_txrx_stats_struct.h>
28 #include "cdp_txrx_ops.h"
29 #include "cdp_txrx_handle.h"
30 #include <cdp_txrx_cmn.h>
31 
32 static inline uint32_t cdp_pflow_update_pdev_params
33 	(ol_txrx_soc_handle soc, uint8_t pdev_id,
34 	enum _dp_param_t param, uint32_t val, void *ctx)
35 {
36 	if (!soc || !soc->ops) {
37 		dp_cdp_debug("Invalid Instance");
38 		QDF_BUG(0);
39 		return 0;
40 	}
41 
42 	if (!soc->ops->pflow_ops ||
43 	    !soc->ops->pflow_ops->pflow_update_pdev_params)
44 		return 0;
45 
46 	return soc->ops->pflow_ops->pflow_update_pdev_params
47 			(soc, pdev_id, param, val, ctx);
48 }
49 #endif
50