qcacld-3.0: Add DISA Component changes into the skeleton

Add final changes of DISA component into the skeleton. Fill up all the
code in core, dispatcher and target_if of the DISA component. Use new
wmi API to extract cmd response from event buffer.

Change-Id: I55f7170efa1055f1449dd95d9f1a911dfa6b54ce
CRs-Fixed: 2161979
This commit is contained in:
Nachiket Kukade
2017-12-20 17:34:46 +05:30
committed by snandini
parent 2c73ade073
commit 6500b612b9
9 changed files with 221 additions and 47 deletions

View File

@@ -32,7 +32,14 @@
*
* Return: QDF_STATUS_SUCCESS - in case of success else return error
*/
#ifdef WLAN_FEATURE_DISA
QDF_STATUS disa_init(void);
#else
static inline QDF_STATUS disa_init(void)
{
return QDF_STATUS_SUCCESS;
}
#endif
/**
* disa_deinit() - unregister disa notification handlers.
@@ -41,7 +48,44 @@ QDF_STATUS disa_init(void);
*
* Return: QDF_STATUS_SUCCESS - in case of success else return error
*/
#ifdef WLAN_FEATURE_DISA
QDF_STATUS disa_deinit(void);
#else
static inline QDF_STATUS disa_deinit(void)
{
return QDF_STATUS_SUCCESS;
}
#endif
/**
* disa_psoc_enable() - Trigger psoc enable for DISA
* @psoc: objmgr psoc object
*
* Return: QDF status success or failure
*/
#ifdef WLAN_FEATURE_DISA
QDF_STATUS disa_psoc_enable(struct wlan_objmgr_psoc *psoc);
#else
static inline QDF_STATUS disa_psoc_enable(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}
#endif
/**
* disa_psoc_disable() - Trigger psoc disable for DISA
* @psoc: objmgr psoc object
*
* Return: QDF status success or failure
*/
#ifdef WLAN_FEATURE_DISA
QDF_STATUS disa_psoc_disable(struct wlan_objmgr_psoc *psoc);
#else
static inline QDF_STATUS disa_psoc_disable(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}
#endif
/**
* disa_psoc_object_created_notification(): disa psoc create handler
@@ -67,19 +111,4 @@ QDF_STATUS disa_psoc_object_created_notification(
QDF_STATUS disa_psoc_object_destroyed_notification(
struct wlan_objmgr_psoc *psoc, void *arg);
/**
* disa_psoc_enable() - Trigger psoc enable for DISA
* @psoc: objmgr psoc object
*
* Return: QDF status success or failure
*/
QDF_STATUS disa_psoc_enable(struct wlan_objmgr_psoc *psoc);
/**
* disa_psoc_disable() - Trigger psoc disable for DISA
* @psoc: objmgr psoc object
*
* Return: QDF status success or failure
*/
QDF_STATUS disa_psoc_disable(struct wlan_objmgr_psoc *psoc);
#endif /* end of _WLAN_DISA_OBJ_MGMT_API_H_ */

View File

@@ -26,7 +26,7 @@
#include "wlan_disa_public_struct.h"
#define GET_DISA_TX_OPS_FROM_VDEV(vedv) \
(disa_psoc_get_priv(psoc)->disa_tx_ops)
(&disa_psoc_get_priv(psoc)->disa_tx_ops)
/**
* tgt_disa_encrypt_decrypt_req() - send encrypt/decrypt request to target if

View File

@@ -193,7 +193,6 @@ QDF_STATUS disa_psoc_object_destroyed_notification(
QDF_STATUS disa_psoc_enable(struct wlan_objmgr_psoc *psoc)
{
return tgt_disa_register_ev_handlers(psoc);
}
/**

View File

@@ -33,7 +33,19 @@
QDF_STATUS tgt_disa_encrypt_decrypt_req(struct wlan_objmgr_psoc *psoc,
struct disa_encrypt_decrypt_req_params *req)
{
return QDF_STATUS_SUCCESS;
struct wlan_disa_tx_ops *disa_tx_ops;
QDF_STATUS status = QDF_STATUS_E_FAILURE;
DISA_ENTER();
disa_tx_ops = GET_DISA_TX_OPS_FROM_VDEV(psoc);
QDF_ASSERT(disa_tx_ops->disa_encrypt_decrypt_req);
if (disa_tx_ops->disa_encrypt_decrypt_req)
status = disa_tx_ops->disa_encrypt_decrypt_req(psoc, req);
DISA_EXIT();
return status;
}
/**
@@ -47,6 +59,35 @@ QDF_STATUS tgt_disa_encrypt_decrypt_req(struct wlan_objmgr_psoc *psoc,
QDF_STATUS tgt_disa_encrypt_decrypt_resp(struct wlan_objmgr_psoc *psoc,
struct disa_encrypt_decrypt_resp_params *resp)
{
struct wlan_disa_ctx *disa_ctx;
encrypt_decrypt_resp_callback cb;
void *cookie;
DISA_ENTER();
if (!resp) {
disa_err("encrypt/decrypt resp is null");
return QDF_STATUS_E_NULL_VALUE;
}
disa_ctx = disa_get_context();
if (!disa_ctx) {
disa_err("DISA context is NULL!");
return QDF_STATUS_E_INVAL;
}
qdf_spin_lock_bh(&disa_ctx->lock);
cb = disa_ctx->callback;
disa_ctx->callback = NULL;
cookie = disa_ctx->callback_context;
disa_ctx->callback_context = NULL;
disa_ctx->request_active = false;
qdf_spin_unlock_bh(&disa_ctx->lock);
if (cb)
cb(cookie, resp);
DISA_EXIT();
return QDF_STATUS_SUCCESS;
}
@@ -58,6 +99,15 @@ QDF_STATUS tgt_disa_encrypt_decrypt_resp(struct wlan_objmgr_psoc *psoc,
*/
QDF_STATUS tgt_disa_register_ev_handlers(struct wlan_objmgr_psoc *psoc)
{
struct wlan_disa_tx_ops *disa_tx_ops;
disa_tx_ops = GET_DISA_TX_OPS_FROM_VDEV(psoc);
QDF_ASSERT(disa_tx_ops->disa_register_ev_handlers);
if (disa_tx_ops->disa_register_ev_handlers)
return disa_tx_ops->disa_register_ev_handlers(psoc);
return QDF_STATUS_SUCCESS;
}
@@ -69,6 +119,15 @@ QDF_STATUS tgt_disa_register_ev_handlers(struct wlan_objmgr_psoc *psoc)
*/
QDF_STATUS tgt_disa_unregister_ev_handlers(struct wlan_objmgr_psoc *psoc)
{
struct wlan_disa_tx_ops *disa_tx_ops;
disa_tx_ops = GET_DISA_TX_OPS_FROM_VDEV(psoc);
QDF_ASSERT(disa_tx_ops->disa_unregister_ev_handlers);
if (disa_tx_ops->disa_unregister_ev_handlers)
return disa_tx_ops->disa_unregister_ev_handlers(psoc);
return QDF_STATUS_SUCCESS;
}