qcacmn: Add cdp ops for MSCS feature
Add a new cdp datapath ops - mscs_ops for Mirrored stream classification signalling feature. This function will be invoked from ECM flow acceleration manager Change-Id: I749623846395057b6ea8328c881efa8733700b0e
This commit is contained in:
55
dp/inc/cdp_txrx_mscs.h
Normal file
55
dp/inc/cdp_txrx_mscs.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright (c) 2020 The Linux Foundation. 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file cdp_txrx_mscs.h
|
||||
* @brief Define the host data path MSCS API functions
|
||||
* called by the host control SW and the OS interface module
|
||||
*/
|
||||
#ifndef _CDP_TXRX_MSCS_H_
|
||||
#define _CDP_TXRX_MSCS_H_
|
||||
#include "cdp_txrx_handle.h"
|
||||
#ifdef WLAN_SUPPORT_MSCS
|
||||
/**
|
||||
* @brief find MSCS enabled peer for this mac address and validate priority
|
||||
* @details
|
||||
* This function checks if there is a peer for this mac adress with MSCS
|
||||
* enabled flag set and nbuf priority is valid from user priority bitmap.
|
||||
*
|
||||
* @param peer_mac - mac address of peer
|
||||
* @param nbuf - nbuf pointer
|
||||
* @return - 0 for non error case, 1 for failure
|
||||
*/
|
||||
static inline int
|
||||
cdp_mscs_peer_lookup_n_get_priority(ol_txrx_soc_handle soc,
|
||||
uint8_t *peer_mac,
|
||||
qdf_nbuf_t nbuf)
|
||||
{
|
||||
if (!soc || !soc->ops || !soc->ops->mscs_ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
||||
"%s invalid instance", __func__);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (soc->ops->mscs_ops->mscs_peer_lookup_n_get_priority)
|
||||
soc->ops->mscs_ops->mscs_peer_lookup_n_get_priority(soc,
|
||||
peer_mac, nbuf);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
@@ -1693,6 +1693,18 @@ struct cdp_cfr_ops {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_SUPPORT_MSCS
|
||||
/**
|
||||
* struct cdp_mscs_ops - data path ops for MSCS
|
||||
* @mscs_peer_lookup_n_get_priority:
|
||||
*/
|
||||
struct cdp_mscs_ops {
|
||||
int (*mscs_peer_lookup_n_get_priority)(struct cdp_soc_t *soc,
|
||||
uint8_t *peer_mac,
|
||||
qdf_nbuf_t nbuf);
|
||||
};
|
||||
#endif
|
||||
|
||||
struct cdp_ops {
|
||||
struct cdp_cmn_ops *cmn_drv_ops;
|
||||
struct cdp_ctrl_ops *ctrl_ops;
|
||||
@@ -1728,6 +1740,9 @@ struct cdp_ops {
|
||||
#if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
|
||||
struct cdp_cfr_ops *cfr_ops;
|
||||
#endif
|
||||
#ifdef WLAN_SUPPORT_MSCS
|
||||
struct cdp_mscs_ops *mscs_ops;
|
||||
#endif
|
||||
|
||||
};
|
||||
#endif
|
||||
|
@@ -68,6 +68,9 @@ cdp_dump_flow_pool_info(struct cdp_soc_t *soc)
|
||||
#ifdef FEATURE_WDS
|
||||
#include "dp_txrx_wds.h"
|
||||
#endif
|
||||
#ifdef WLAN_SUPPORT_MSCS
|
||||
#include "dp_mscs.h"
|
||||
#endif
|
||||
#ifdef ATH_SUPPORT_IQUE
|
||||
#include "dp_txrx_me.h"
|
||||
#endif
|
||||
@@ -10962,6 +10965,12 @@ static struct cdp_cfr_ops dp_ops_cfr = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_SUPPORT_MSCS
|
||||
static struct cdp_mscs_ops dp_ops_mscs = {
|
||||
.mscs_peer_lookup_n_get_priority = dp_mscs_peer_lookup_n_get_priority,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_RUNTIME_PM
|
||||
/**
|
||||
* dp_runtime_suspend() - ensure DP is ready to runtime suspend
|
||||
@@ -11614,6 +11623,9 @@ static struct cdp_ops dp_txrx_ops = {
|
||||
#if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
|
||||
.cfr_ops = &dp_ops_cfr,
|
||||
#endif
|
||||
#ifdef WLAN_SUPPORT_MSCS
|
||||
.mscs_ops = &dp_ops_mscs,
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user