/* * Copyright (c) 2016-2017, 2019 The Linux Foundation. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all * copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef _CDP_TXRX_OCB_H_ #define _CDP_TXRX_OCB_H_ #include #include "cdp_txrx_handle.h" /** * cdp_set_ocb_chan_info() - set OCB channel info to vdev. * @soc: data path soc handle * @vdev_id: vdev_id corresponding to vdev start * @ocb_set_chan: OCB channel information to be set in vdev. * * Return: NONE */ static inline void cdp_set_ocb_chan_info(ol_txrx_soc_handle soc, uint8_t vdev_id, struct ol_txrx_ocb_set_chan ocb_set_chan) { if (!soc || !soc->ops || !soc->ops->ocb_ops) { QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL, "%s invalid instance", __func__); return; } if (soc->ops->ocb_ops->set_ocb_chan_info) soc->ops->ocb_ops->set_ocb_chan_info(soc, vdev_id, ocb_set_chan); } /** * cdp_get_ocb_chan_info() - return handle to vdev ocb_channel_info * @soc: data path soc handle * @vdev_id: vdev_id corresponding to vdev start * * Return: handle to struct ol_txrx_ocb_chan_info */ static inline struct ol_txrx_ocb_chan_info * cdp_get_ocb_chan_info(ol_txrx_soc_handle soc, uint8_t vdev_id) { if (!soc || !soc->ops || !soc->ops->ocb_ops) { QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL, "%s invalid instance", __func__); return NULL; } if (soc->ops->ocb_ops->get_ocb_chan_info) return soc->ops->ocb_ops->get_ocb_chan_info(soc, vdev_id); return NULL; } #endif /* _CDP_TXRX_OCB_H_ */