qcacmn: Add APIs to init Spectral feature caps in the upper layer
Add APIs to init Spectral feature caps in the upper layer of the Spectral module. CRs-Fixed: 2840249 Change-Id: Idfb34a9eec3a66c6d193be7bb828eeec30548ae7
This commit is contained in:
parent
19aaca7ff9
commit
3e679f9176
@ -344,4 +344,13 @@ tgt_spectral_register_events(struct wlan_objmgr_psoc *psoc);
|
||||
*/
|
||||
QDF_STATUS
|
||||
tgt_spectral_unregister_events(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* tgt_spectral_init_pdev_feature_caps() - Init pdev spectral feature caps
|
||||
* @pdev: pdev handle
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
tgt_spectral_init_pdev_feature_caps(struct wlan_objmgr_pdev *pdev);
|
||||
#endif /* _WLAN_SPECTRAL_TGT_API_H_ */
|
||||
|
@ -245,6 +245,43 @@ QDF_STATUS spectral_register_dbr(struct wlan_objmgr_pdev *pdev);
|
||||
*/
|
||||
QDF_STATUS spectral_unregister_dbr(struct wlan_objmgr_pdev *pdev);
|
||||
|
||||
/**
|
||||
* wlan_spectral_init_pdev_feature_caps() - API to initialize
|
||||
* spectral pdev feature caps
|
||||
* @pdev: pointer to pdev object
|
||||
*
|
||||
* API to initialize Spectral feature caps for a given pdev.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS upon successful initialization,
|
||||
* QDF_STATUS_E_FAILURE upon failure
|
||||
*/
|
||||
QDF_STATUS wlan_spectral_init_pdev_feature_caps(struct wlan_objmgr_pdev *pdev);
|
||||
|
||||
/**
|
||||
* wlan_spectral_init_psoc_feature_cap() - API to initialize
|
||||
* spectral psoc feature caps
|
||||
* @psoc: pointer to psoc object
|
||||
*
|
||||
* API to initialize Spectral feature caps for a given psoc.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS upon successful initialization,
|
||||
* QDF_STATUS_E_FAILURE upon failure
|
||||
*/
|
||||
QDF_STATUS wlan_spectral_init_psoc_feature_cap(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* wlan_spectral_pdev_get_lmac_if_txops() - API to get pointer
|
||||
* to Spectral txops structure
|
||||
* @pdev: pointer to pdev object
|
||||
*
|
||||
* API to get pointer to Spectral txops structure
|
||||
*
|
||||
* Return: Pointer to Spectral txops structure, NULL in case of
|
||||
* error.
|
||||
*/
|
||||
struct wlan_lmac_if_sptrl_tx_ops *
|
||||
wlan_spectral_pdev_get_lmac_if_txops(struct wlan_objmgr_pdev *pdev);
|
||||
|
||||
#ifdef DIRECT_BUF_RX_ENABLE
|
||||
/**
|
||||
* spectral_dbr_event_handler() - Spectral dbr event handler
|
||||
|
@ -661,3 +661,21 @@ tgt_spectral_unregister_events(struct wlan_objmgr_psoc *psoc)
|
||||
return psptrl_tx_ops->sptrlto_unregister_events(psoc);
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
tgt_spectral_init_pdev_feature_caps(struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
struct wlan_lmac_if_sptrl_tx_ops *spectral_tx_ops;
|
||||
|
||||
if (!pdev) {
|
||||
spectral_err("pdev is NULL!");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
spectral_tx_ops = wlan_spectral_pdev_get_lmac_if_txops(pdev);
|
||||
if (!spectral_tx_ops) {
|
||||
spectral_err("Spectral txops is null");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return spectral_tx_ops->sptrlto_init_pdev_feature_caps(pdev);
|
||||
}
|
||||
|
@ -36,6 +36,30 @@ bool wlan_spectral_is_feature_disabled(struct wlan_objmgr_psoc *psoc)
|
||||
return false;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_spectral_init_pdev_feature_caps(struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
return tgt_spectral_init_pdev_feature_caps(pdev);
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_spectral_init_psoc_feature_cap(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
if (!psoc) {
|
||||
spectral_err("PSOC is NULL!");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (cfg_get(psoc, CFG_SPECTRAL_DISABLE))
|
||||
wlan_psoc_nif_feat_cap_set(psoc,
|
||||
WLAN_SOC_F_SPECTRAL_INI_DISABLE);
|
||||
else
|
||||
wlan_psoc_nif_feat_cap_clear(psoc,
|
||||
WLAN_SOC_F_SPECTRAL_INI_DISABLE);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_spectral_init(void)
|
||||
{
|
||||
@ -462,3 +486,29 @@ QDF_STATUS wlan_spectral_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
||||
|
||||
return tgt_spectral_unregister_events(psoc);
|
||||
}
|
||||
|
||||
struct wlan_lmac_if_sptrl_tx_ops *
|
||||
wlan_spectral_pdev_get_lmac_if_txops(struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
struct wlan_lmac_if_tx_ops *tx_ops;
|
||||
|
||||
if (!pdev) {
|
||||
spectral_err("pdev is NULL!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
psoc = wlan_pdev_get_psoc(pdev);
|
||||
if (!psoc) {
|
||||
spectral_err("psoc is NULL!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
|
||||
if (!tx_ops) {
|
||||
spectral_err("tx_ops is NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return &tx_ops->sptrl_tx_ops;
|
||||
}
|
||||
|
@ -6004,6 +6004,8 @@ target_if_sptrl_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
target_if_spectral_register_events;
|
||||
tx_ops->sptrl_tx_ops.sptrlto_unregister_events =
|
||||
target_if_spectral_unregister_events;
|
||||
tx_ops->sptrl_tx_ops.sptrlto_init_pdev_feature_caps =
|
||||
target_if_spectral_init_pdev_feature_caps;
|
||||
|
||||
target_if_sptrl_debug_register_tx_ops(tx_ops);
|
||||
}
|
||||
|
@ -594,6 +594,7 @@ struct spectral_tgt_ops;
|
||||
* on the previous state
|
||||
* @sptrlto_register_events: Registration of WMI events for Spectral
|
||||
* @sptrlto_unregister_events: Unregistration of WMI events for Spectral
|
||||
* @sptrlto_init_pdev_feature_caps: Initialize spectral feature capabilities
|
||||
**/
|
||||
struct wlan_lmac_if_sptrl_tx_ops {
|
||||
void *(*sptrlto_pdev_spectral_init)(struct wlan_objmgr_pdev *pdev);
|
||||
@ -656,6 +657,8 @@ struct wlan_lmac_if_sptrl_tx_ops {
|
||||
struct wlan_objmgr_pdev *pdev);
|
||||
QDF_STATUS (*sptrlto_register_events)(struct wlan_objmgr_psoc *psoc);
|
||||
QDF_STATUS (*sptrlto_unregister_events)(struct wlan_objmgr_psoc *psoc);
|
||||
QDF_STATUS (*sptrlto_init_pdev_feature_caps)(
|
||||
struct wlan_objmgr_pdev *pdev);
|
||||
};
|
||||
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user