1 /* 2 * Copyright (c) 2016-2017,2019-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /** 21 * DOC: cdp_txrx_pflow.h 22 * Define the host data path peer flow API functions 23 * called by the host control SW and the OS interface module 24 */ 25 #ifndef _CDP_TXRX_PFLOW_H_ 26 #define _CDP_TXRX_PFLOW_H_ 27 28 #include <cdp_txrx_stats_struct.h> 29 #include "cdp_txrx_ops.h" 30 #include "cdp_txrx_handle.h" 31 #include <cdp_txrx_cmn.h> 32 33 static inline uint32_t cdp_pflow_update_pdev_params 34 (ol_txrx_soc_handle soc, uint8_t pdev_id, 35 enum _dp_param_t param, uint32_t val, void *ctx) 36 { 37 if (!soc || !soc->ops) { 38 dp_cdp_debug("Invalid Instance"); 39 QDF_BUG(0); 40 return 0; 41 } 42 43 if (!soc->ops->pflow_ops || 44 !soc->ops->pflow_ops->pflow_update_pdev_params) 45 return 0; 46 47 return soc->ops->pflow_ops->pflow_update_pdev_params 48 (soc, pdev_id, param, val, ctx); 49 } 50 #endif 51