qcacmn: CFR: APIs to get/set CFR RCC mode

APIs to set/get cfr rcc configuration in DP layer.

Change-Id: I4f8740f5f4cc1dd3af0f8d5915639f2a17918359
CRs-Fixed: 2593416
This commit is contained in:
Padma Raghunathan
2019-12-26 19:40:12 +05:30
committed by nshrivas
parent f75841764c
commit d2afc70e7c
3 changed files with 94 additions and 0 deletions

View File

@@ -749,6 +749,53 @@ cdp_cfr_filter(ol_txrx_soc_handle soc,
soc->ops->cfr_ops->txrx_cfr_filter(soc, pdev_id, enable, filter_val);
}
/**
* cdp_get_cfr_rcc() - get cfr rcc config
* @soc: Datapath soc handle
* @pdev_id: id of objmgr pdev
*
* Return: true/false based on cfr mode setting
*/
static inline
bool cdp_get_cfr_rcc(ol_txrx_soc_handle soc, uint8_t pdev_id)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
"%s invalid instance", __func__);
QDF_BUG(0);
return 0;
}
if (!soc->ops->cfr_ops || !soc->ops->cfr_ops->txrx_get_cfr_rcc)
return 0;
return soc->ops->cfr_ops->txrx_get_cfr_rcc(soc, pdev_id);
}
/**
* cdp_set_cfr_rcc() - enable/disable cfr rcc config
* @soc: Datapath soc handle
* @pdev_id: id of objmgr pdev
* @enable: Enable/Disable cfr rcc mode
*
* Return: none
*/
static inline
void cdp_set_cfr_rcc(ol_txrx_soc_handle soc, uint8_t pdev_id, bool enable)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
"%s invalid instance", __func__);
QDF_BUG(0);
return;
}
if (!soc->ops->cfr_ops || !soc->ops->cfr_ops->txrx_set_cfr_rcc)
return;
return soc->ops->cfr_ops->txrx_set_cfr_rcc(soc, pdev_id, enable);
}
#endif
#if defined(WLAN_TX_PKT_CAPTURE_ENH) || defined(WLAN_RX_PKT_CAPTURE_ENH)

View File

@@ -1619,12 +1619,19 @@ struct cdp_rx_offld_ops {
/**
* struct cdp_cfr_ops - host cfr ops
* @txrx_cfr_filter: Handler to configure host rx monitor status ring
* @txrx_get_cfr_rcc: Handler to get CFR mode
* @txrx_set_cfr_rcc: Handler to enable/disable CFR mode
*/
struct cdp_cfr_ops {
void (*txrx_cfr_filter)(struct cdp_soc_t *soc_hdl,
uint8_t pdev_id,
bool enable,
struct cdp_monitor_filter *filter_val);
bool (*txrx_get_cfr_rcc)(struct cdp_soc_t *soc_hdl,
uint8_t pdev_id);
void (*txrx_set_cfr_rcc)(struct cdp_soc_t *soc_hdl,
uint8_t pdev_id,
bool enable);
};
#endif

View File

@@ -156,6 +156,9 @@ static void dp_cfr_filter(struct cdp_soc_t *soc_hdl,
uint8_t pdev_id,
bool enable,
struct cdp_monitor_filter *filter_val);
static bool dp_get_cfr_rcc(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
static void dp_set_cfr_rcc(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
bool enable);
#endif
static uint8_t dp_soc_ring_if_nss_offloaded(struct dp_soc *soc,
enum hal_ring_type ring_type,
@@ -9848,6 +9851,8 @@ static struct cdp_pflow_ops dp_ops_pflow = {
#if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
static struct cdp_cfr_ops dp_ops_cfr = {
.txrx_cfr_filter = dp_cfr_filter,
.txrx_get_cfr_rcc = dp_get_cfr_rcc,
.txrx_set_cfr_rcc = dp_set_cfr_rcc,
};
#endif
@@ -10807,6 +10812,41 @@ static void dp_cfr_filter(struct cdp_soc_t *soc_hdl,
&htt_tlv_filter);
}
}
/**
* dp_get_cfr_rcc() - get cfr rcc config
* @soc_hdl: Datapath soc handle
* @pdev_id: id of objmgr pdev
*
* Return: true/false based on cfr mode setting
*/
static
bool dp_get_cfr_rcc(struct cdp_soc_t *soc_hdl, uint8_t pdev_id)
{
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
struct dp_pdev *pdev =
dp_get_pdev_from_soc_pdev_id_wifi3(soc, pdev_id);
return pdev->cfr_rcc_mode;
}
/**
* dp_set_cfr_rcc() - enable/disable cfr rcc config
* @soc_hdl: Datapath soc handle
* @pdev_id: id of objmgr pdev
* @enable: Enable/Disable cfr rcc mode
*
* Return: none
*/
static
void dp_set_cfr_rcc(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, bool enable)
{
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
struct dp_pdev *pdev =
dp_get_pdev_from_soc_pdev_id_wifi3(soc, pdev_id);
pdev->cfr_rcc_mode = enable;
}
#endif
/*