qcacmn: move crypto init from umac to cmn code

move crypto init from umac to cmn code

Move wlan_crypto_main.h file from src folder to
include folder

Change #if to #ifdef

Change-Id: I363d4b2e7b2c2fc3291f1dd5ef8a6f3837a82df5
This commit is contained in:
Ashok Ponnaiah
2017-03-24 06:22:24 +05:30
committed by Sandeep Puligilla
parent 439d7b515d
commit f8c3145190
4 changed files with 50 additions and 7 deletions

View File

@@ -39,6 +39,9 @@
#include "wlan_nan_api.h"
#endif /* WLAN_FEATURE_NAN_CONVERGENCE */
#ifdef WLAN_CONV_CRYPTO_SUPPORTED
#include "wlan_crypto_main.h"
#endif
/**
* DOC: This file provides various init/deinit trigger point for new
* components.
@@ -273,6 +276,28 @@ static QDF_STATUS atf_psoc_disable(struct wlan_objmgr_psoc *psoc)
}
#endif /* END of WLAN_ATF_ENABLE */
#ifdef WLAN_CONV_CRYPTO_SUPPORTED
static QDF_STATUS dispatcher_init_crypto(void)
{
return wlan_crypto_init();
}
static QDF_STATUS dispatcher_deinit_crypto(void)
{
return wlan_crypto_deinit();
}
#else
static QDF_STATUS dispatcher_init_crypto(void)
{
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS dispatcher_deinit_crypto(void)
{
return QDF_STATUS_SUCCESS;
}
#endif /* END of WLAN_CONV_CRYPTO_SUPPORTED */
#ifdef WIFI_POS_CONVERGED
static QDF_STATUS dispatcher_init_wifi_pos(void)
{
@@ -383,6 +408,9 @@ QDF_STATUS dispatcher_init(void)
if (QDF_STATUS_SUCCESS != dispatcher_init_pmo())
goto pmo_init_fail;
if (QDF_STATUS_SUCCESS != dispatcher_init_crypto())
goto crypto_init_fail;
if (QDF_STATUS_SUCCESS != dispatcher_policy_mgr_init())
goto policy_mgr_init_fail;
@@ -404,6 +432,8 @@ wifi_pos_init_fail:
atf_init_fail:
dispatcher_policy_mgr_deinit();
policy_mgr_init_fail:
dispatcher_deinit_crypto();
crypto_init_fail:
dispatcher_deinit_pmo();
pmo_init_fail:
scheduler_deinit();
@@ -435,6 +465,8 @@ QDF_STATUS dispatcher_deinit(void)
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_policy_mgr_deinit());
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_crypto());
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_pmo());
QDF_BUG(QDF_STATUS_SUCCESS == scheduler_deinit());

View File

@@ -28,7 +28,7 @@
#include "wlan_atf_utils_defs.h"
#endif
#if WLAN_CONV_CRYPTO_SUPPORTED
#ifdef WLAN_CONV_CRYPTO_SUPPORTED
#include "wlan_crypto_global_def.h"
#endif
@@ -372,7 +372,7 @@ struct wlan_lmac_if_tx_ops {
#ifdef WLAN_ATF_ENABLE
struct wlan_lmac_if_atf_tx_ops atf_tx_ops;
#endif
#if WLAN_CONV_CRYPTO_SUPPORTED
#ifdef WLAN_CONV_CRYPTO_SUPPORTED
struct wlan_lmac_if_crypto_tx_ops crypto_tx_ops;
#endif
#ifdef WIFI_POS_CONVERGED
@@ -596,7 +596,7 @@ struct wlan_lmac_if_rx_ops {
#ifdef WLAN_ATF_ENABLE
struct wlan_lmac_if_atf_rx_ops atf_rx_ops;
#endif
#if WLAN_CONV_CRYPTO_SUPPORTED
#ifdef WLAN_CONV_CRYPTO_SUPPORTED
struct wlan_lmac_if_crypto_rx_ops crypto_rx_ops;
#endif
#ifdef WIFI_POS_CONVERGED

View File

@@ -32,7 +32,7 @@
#include "target_if_nan.h"
#endif /* WLAN_FEATURE_NAN_CONVERGENCE */
#if WLAN_CONV_CRYPTO_SUPPORTED
#ifdef WLAN_CONV_CRYPTO_SUPPORTED
#include "wlan_crypto_global_api.h"
#endif
/* Function pointer for OL/WMA specific UMAC tx_ops
@@ -99,6 +99,19 @@ wlan_lmac_if_atf_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
}
#endif
#ifdef WLAN_CONV_CRYPTO_SUPPORTED
static void
wlan_lmac_if_crypto_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
{
wlan_crypto_register_crypto_rx_ops(&rx_ops->crypto_rx_ops);
}
#else
static void
wlan_lmac_if_crypto_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
{
}
#endif
#ifdef WIFI_POS_CONVERGED
static void wlan_lmac_if_umac_rx_ops_register_wifi_pos(
struct wlan_lmac_if_rx_ops *rx_ops)
@@ -162,9 +175,7 @@ wlan_lmac_if_umac_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
rx_ops->scan.scan_ev_handler = tgt_scan_event_handler;
wlan_lmac_if_atf_rx_ops_register(rx_ops);
#if WLAN_CONV_CRYPTO_SUPPORTED
wlan_crypto_register_crypto_rx_ops(&rx_ops->crypto_rx_ops);
#endif
wlan_lmac_if_crypto_rx_ops_register(rx_ops);
/* wifi_pos rx ops */
wlan_lmac_if_umac_rx_ops_register_wifi_pos(rx_ops);