qcacmn: Support for DP RX Threads

Add support for DP RX Threads as a part of the FR. Multiple RX
threads can be enabled from the ini. The code is added in a new DP
module outside of the cmn project.

Change-Id: Id966c46c2799d23c2a4fa1c884610955afed3565
CRs-Fixed: 2256470
This commit is contained in:
Mohit Khanna
2018-05-24 11:58:13 -07:00
کامیت شده توسط nshrivas
والد 2e590ab62b
کامیت 7ac554bda5
14فایلهای تغییر یافته به همراه331 افزوده شده و 34 حذف شده

مشاهده پرونده

@@ -34,6 +34,11 @@
* Common Data Path Header File
*
*****************************************************************************/
#define dp_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_DP, params)
#define dp_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_DP, params)
#define dp_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_DP, params)
#define dp_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_DP, params)
#define dp_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_DP, params)
static inline int
cdp_soc_attach_target(ol_txrx_soc_handle soc)
@@ -916,6 +921,37 @@ static inline struct cdp_pdev *cdp_get_pdev_from_vdev
return soc->ops->cmn_drv_ops->txrx_get_pdev_from_vdev(vdev);
}
/**
* cdp_get_os_rx_handles_from_vdev() - Return os rx handles for a vdev
* @soc: ol_txrx_soc_handle handle
* @vdev: vdev for which os rx handles are needed
* @stack_fn_p: pointer to stack function pointer
* @osif_handle_p: pointer to ol_osif_vdev_handle
*
* Return: void
*/
static inline
void cdp_get_os_rx_handles_from_vdev(ol_txrx_soc_handle soc,
struct cdp_vdev *vdev,
ol_txrx_rx_fp *stack_fn_p,
ol_osif_vdev_handle *osif_handle_p)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
"%s: Invalid Instance:", __func__);
QDF_BUG(0);
return;
}
if (!soc->ops->cmn_drv_ops ||
!soc->ops->cmn_drv_ops->txrx_get_os_rx_handles_from_vdev)
return;
soc->ops->cmn_drv_ops->txrx_get_os_rx_handles_from_vdev(vdev,
stack_fn_p,
osif_handle_p);
}
/**
* cdp_get_ctrl_pdev_from_vdev() - Return control pdev of vdev
* @vdev: vdev handle

مشاهده پرونده

@@ -573,7 +573,7 @@ typedef void (*ol_txrx_stats_callback)(void *ctxt,
* OSIF which is called from txrx to
* indicate whether the transmit OS
* queues should be paused/resumed
* @rx.std - the OS shim rx function to deliver rx data
* @rx.rx - the OS shim rx function to deliver rx data
* frames to. This can have different values for
* different virtual devices, e.g. so one virtual
* device's OS shim directly hands rx frames to the OS,
@@ -581,7 +581,11 @@ typedef void (*ol_txrx_stats_callback)(void *ctxt,
* messages before sending the rx frames to the OS. The
* netbufs delivered to the osif_rx function are in the
* format specified by the OS to use for tx and rx
* frames (either 802.3 or native WiFi)
* frames (either 802.3 or native WiFi). In case RX Threads are enabled, pkts
* are given to the thread, instead of the stack via this pointer.
* @rx.stack - function to give packets to the stack. Differs from @rx.rx.
* In case RX Threads are enabled, this pointer holds the callback to give
* packets to the stack.
* @rx.wai_check - the tx function pointer for WAPI frames
* @rx.mon - the OS shim rx monitor function to deliver
* monitor data to Though in practice, it is probable
@@ -613,6 +617,7 @@ struct ol_txrx_ops {
/* rx function pointers - specified by OS shim, stored by txrx */
struct {
ol_txrx_rx_fp rx;
ol_txrx_rx_fp rx_stack;
ol_txrx_rx_check_wai_fp wai_check;
ol_txrx_rx_mon_fp mon;
ol_txrx_stats_rx_fp stats_rx;

مشاهده پرونده

@@ -16,7 +16,6 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/**
* @file cdp_txrx_ops.h
* @brief Define the host data path converged API functions
@@ -334,6 +333,18 @@ struct cdp_cmn_ops {
struct cdp_ctrl_objmgr_pdev *ctrl_pdev);
ol_txrx_tx_fp tx_send;
/**
* txrx_get_os_rx_handles_from_vdev() - Return function, osif vdev
* to deliver pkt to stack.
* @vdev: vdev handle
* @stack_fn: pointer to - function pointer to deliver RX pkt to stack
* @osif_vdev: pointer to - osif vdev to deliver RX packet to.
*/
void (*txrx_get_os_rx_handles_from_vdev)
(struct cdp_vdev *vdev,
ol_txrx_rx_fp *stack_fn,
ol_osif_vdev_handle *osif_vdev);
};
struct cdp_ctrl_ops {