qcacmn: Off-chan txrx componentization changes

Add new module id for offchan txrx compotent and call offchan init/deint.

Change-Id: I803925d2dafdbe3800636de4e5ac4ae69c4851d0
CRs-Fixed: 2030050
This commit is contained in:
Kiran Venkatappa
2017-04-04 00:09:10 +05:30
committed by Sandeep Puligilla
parent 3a0005c210
commit 3453674e75
4 changed files with 36 additions and 0 deletions

View File

@@ -52,6 +52,9 @@
#include <wlan_dfs_init_deinit_api.h>
#endif
#ifdef WLAN_OFFCHAN_TXRX_ENABLE
#include <wlan_offchan_txrx_api.h>
#endif
/**
* DOC: This file provides various init/deinit trigger point for new
* components.
@@ -461,6 +464,28 @@ static QDF_STATUS dispatcher_deinit_dfs(void)
}
#endif
#ifdef WLAN_OFFCHAN_TXRX_ENABLE
static QDF_STATUS dispatcher_offchan_txrx_init(void)
{
return wlan_offchan_txrx_init();
}
static QDF_STATUS dispatcher_offchan_txrx_deinit(void)
{
return wlan_offchan_txrx_deinit();
}
#else
static QDF_STATUS dispatcher_offchan_txrx_init(void)
{
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS dispatcher_offchan_txrx_deinit(void)
{
return QDF_STATUS_SUCCESS;
}
#endif /*WLAN_OFFCHAN_TXRX_ENABLE*/
QDF_STATUS dispatcher_init(void)
{
if (QDF_STATUS_SUCCESS != wlan_objmgr_global_obj_init())
@@ -508,8 +533,13 @@ QDF_STATUS dispatcher_init(void)
if (QDF_STATUS_SUCCESS != dispatcher_regulatory_init())
goto regulatory_init_fail;
if (QDF_STATUS_SUCCESS != dispatcher_offchan_txrx_init())
goto offchan_init_fail;
return QDF_STATUS_SUCCESS;
offchan_init_fail:
dispatcher_regulatory_deinit();
regulatory_init_fail:
dispatcher_deinit_dfs();
dfs_init_fail:
@@ -546,6 +576,8 @@ EXPORT_SYMBOL(dispatcher_init);
QDF_STATUS dispatcher_deinit(void)
{
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_offchan_txrx_deinit());
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_regulatory_deinit());
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_dfs());

View File

@@ -384,6 +384,7 @@ typedef enum {
QDF_MODULE_ID_CONFIG,
QDF_MODULE_ID_REGULATORY,
QDF_MODULE_ID_NAN,
QDF_MODULE_ID_OFFCHAN_TXRX,
QDF_MODULE_ID_ANY,
QDF_MODULE_ID_MAX,
} QDF_MODULE_ID;

View File

@@ -1809,6 +1809,7 @@ struct category_name_info g_qdf_category_name[MAX_SUPPORTED_CATEGORY] = {
[QDF_MODULE_ID_POLICY_MGR] = {"POLICY_MGR"},
[QDF_MODULE_ID_NAN] = {"NAN"},
[QDF_MODULE_ID_P2P] = {"P2P"},
[QDF_MODULE_ID_OFFCHAN_TXRX] = {"OFFCHAN"},
[QDF_MODULE_ID_ANY] = {"ANY"},
};

View File

@@ -111,6 +111,7 @@
* @WLAN_UMAC_COMP_NAN: Neighbor Aware Networking
* @WLAN_UMAC_COMP_DFS: DFS
* @WLAN_UMAC_COMP_ID_MAX: Maximum components in UMAC
* @WLAN_UMAC_COMP_OFFCHAN_TXRX: Offchan TxRx
*
* This id is static.
* On Adding new component, new id has to be assigned
@@ -131,6 +132,7 @@ enum wlan_umac_comp_id {
WLAN_UMAC_COMP_CRYPTO,
WLAN_UMAC_COMP_NAN,
WLAN_UMAC_COMP_DFS,
WLAN_UMAC_COMP_OFFCHAN_TXRX,
WLAN_UMAC_COMP_ID_MAX,
};