qcacmn: CFR Feature support

Add CFR component specific Rx-Ops callbacks

Change-Id: Ic1e89ca2ba049f9579964de50d7285cd40a0d3a7
CRs-Fixed: 2397716
This commit is contained in:
narayan
2019-02-18 11:24:04 +05:30
committed by nshrivas
parent b7293e46c3
commit d9e53400e9
4 changed files with 69 additions and 0 deletions

View File

@@ -225,6 +225,7 @@ struct tgt_info {
* @set_default_tgt_config: Sets target config with default values
* @sw_version_check: Checks the SW version
* @smart_log_enable: Enable Smart Logs feature
* @cfr_support_enable: CFR support enable
*/
struct target_ops {
QDF_STATUS (*ext_resource_config_enable)
@@ -282,6 +283,9 @@ struct target_ops {
void (*eapol_minrate_enable)
(struct wlan_objmgr_psoc *psoc,
struct target_psoc_info *tgt_info, uint8_t *event);
void (*cfr_support_enable)
(struct wlan_objmgr_psoc *psoc,
struct target_psoc_info *tgt_info, uint8_t *event);
};
@@ -1687,6 +1691,24 @@ static inline void target_if_smart_antenna_enable(struct wlan_objmgr_psoc *psoc,
tgt_hdl->tif_ops->smart_antenna_enable(psoc, tgt_hdl, evt_buf);
}
/**
* target_if_cfr_support_enable - Enable cfr support
* @psoc: psoc object
* @tgt_hdl: target_psoc_info pointer
* @evt_buf: Event buffer received from FW
*
* API to enable cfr support
*
* Return: none
*/
static inline void target_if_cfr_support_enable(struct wlan_objmgr_psoc *psoc,
struct target_psoc_info *tgt_hdl, uint8_t *evt_buf)
{
if ((tgt_hdl->tif_ops) &&
(tgt_hdl->tif_ops->cfr_support_enable))
tgt_hdl->tif_ops->cfr_support_enable(psoc, tgt_hdl, evt_buf);
}
/**
* target_if_atf_cfg_enable - Enable ATF config
* @psoc: psoc object

View File

@@ -124,6 +124,8 @@ static int init_deinit_service_ready_event_handler(ol_scn_t scn_handle,
target_if_smart_antenna_enable(psoc, tgt_hdl, event);
target_if_cfr_support_enable(psoc, tgt_hdl, event);
target_if_peer_cfg_enable(psoc, tgt_hdl, event);
target_if_atf_cfg_enable(psoc, tgt_hdl, event);

View File

@@ -1141,6 +1141,21 @@ struct wlan_lmac_if_sa_api_rx_ops {
};
#endif
#ifdef WLAN_CFR_ENABLE
/**
* struct wlan_lmac_if_cfr_rx_ops - CFR south bound rx function pointers
* @cfr_support_set: Set the CFR support based on FW advert
* @cfr_info_send: Send cfr info to upper layers
*/
struct wlan_lmac_if_cfr_rx_ops {
void (*cfr_support_set)(struct wlan_objmgr_psoc *psoc, uint32_t value);
uint32_t (*cfr_info_send)(struct wlan_objmgr_pdev *pdev, void *head,
size_t hlen, void *data, size_t dlen,
void *tail, size_t tlen);
};
#endif
#ifdef WLAN_CONV_SPECTRAL_ENABLE
/**
* struct wlan_lmac_if_sptrl_rx_ops - Spectral south bound Rx operations
@@ -1447,6 +1462,7 @@ struct wlan_lmac_if_green_ap_rx_ops {
* @scan: scan rx ops
* @dfs_rx_ops: dfs rx ops.
* @cp_stats_rx_ops: cp stats rx ops
* @cfr_rx_ops: cfr rx ops
*
* Callback function tabled to be registered with lmac/wmi.
* lmac will use the functional table to send events/frames to umac
@@ -1473,6 +1489,10 @@ struct wlan_lmac_if_rx_ops {
struct wlan_lmac_if_sa_api_rx_ops sa_api_rx_ops;
#endif
#ifdef WLAN_CFR_ENABLE
struct wlan_lmac_if_cfr_rx_ops cfr_rx_ops;
#endif
#ifdef WLAN_CONV_SPECTRAL_ENABLE
struct wlan_lmac_if_sptrl_rx_ops sptrl_rx_ops;
#endif

View File

@@ -69,6 +69,10 @@
#include <wlan_vdev_mgr_tgt_if_rx_api.h>
#endif
#ifdef WLAN_CFR_ENABLE
#include "wlan_cfr_tgt_api.h"
#endif
/* Function pointer for OL/WMA specific UMAC tx_ops
* registration.
*/
@@ -231,6 +235,25 @@ wlan_lmac_if_sa_api_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
}
#endif
#ifdef WLAN_CFR_ENABLE
/**
* wlan_lmac_if_cfr_rx_ops_register() - Function to register CFR RX ops
*/
static void
wlan_lmac_if_cfr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
{
struct wlan_lmac_if_cfr_rx_ops *cfr_rx_ops = &rx_ops->cfr_rx_ops;
/* CFR rx ops */
cfr_rx_ops->cfr_support_set = tgt_cfr_support_set;
cfr_rx_ops->cfr_info_send = tgt_cfr_info_send;
}
#else
static void
wlan_lmac_if_cfr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
{
}
#endif
#ifdef WLAN_CONV_CRYPTO_SUPPORTED
static void
@@ -510,6 +533,8 @@ wlan_lmac_if_umac_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
wlan_lmac_if_sa_api_rx_ops_register(rx_ops);
wlan_lmac_if_cfr_rx_ops_register(rx_ops);
wlan_lmac_if_crypto_rx_ops_register(rx_ops);
/* wifi_pos rx ops */
wlan_lmac_if_umac_rx_ops_register_wifi_pos(rx_ops);