qcacmn: Define API to get component handles

Introduce APIs set and get component handles

Change-Id: I8bfcd802f10b8ecf9908a02d492f1ad757d8f7ec
CRs-Fixed: 2177109
此提交包含在:
Srinivas Pitla
2018-01-22 16:10:33 +05:30
提交者 snandini
父節點 f6b4bc8f02
當前提交 0b9d3b241a
共有 5 個檔案被更改,包括 99 行新增55 行删除

查看文件

@@ -144,6 +144,36 @@ uint32_t ucfg_get_tgt_revision(struct wlan_objmgr_psoc *psoc);
*/
bool ucfg_is_target_ar900b(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_get_wmi_hdl() - get wmi handle
* @psoc: pointer to psoc
*
* API to get wmi handle
*
* Return: wmi handler
*/
void *ucfg_get_wmi_hdl(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_get_htc_hdl() - get htc handler
* @psoc: pointer to psoc
*
* API to get htc handle
*
* Return: htc handler
*/
void *ucfg_get_htc_hdl(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_get_hif_hdl() - get hif handle
* @psoc: pointer to psoc
*
* API to get hif handle
*
* Return: hif handler
*/
void *ucfg_get_hif_hdl(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_get_pdev_wmi_handle() - get pdev wmi handle
* @pdev: pointer to dev

查看文件

@@ -57,8 +57,7 @@ struct wlan_psoc_target_capability_info *ucfg_get_target_cap(
return NULL;
}
tgt_hdl = (struct target_psoc_info *)wlan_psoc_get_tgt_if_handle(
psoc);
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
if (!tgt_hdl) {
target_if_err("target_psoc_info is null");
return NULL;
@@ -115,8 +114,7 @@ target_resource_config *ucfg_get_tgt_res_cfg(struct wlan_objmgr_psoc *psoc)
return NULL;
}
tgt_hdl = (struct target_psoc_info *)wlan_psoc_get_tgt_if_handle(
psoc);
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
if (!tgt_hdl) {
target_if_err("target_psoc_info is null");
return NULL;
@@ -134,8 +132,7 @@ int32_t ucfg_get_pdev_idx(struct wlan_objmgr_pdev *pdev)
return 0xffffffff;
}
tgt_hdl = (struct target_pdev_info *)wlan_pdev_get_tgt_if_handle(
pdev);
tgt_hdl = wlan_pdev_get_tgt_if_handle(pdev);
if (!tgt_hdl) {
target_if_err("target_pdev_info is null");
return 0xffffffff;
@@ -153,8 +150,7 @@ uint32_t ucfg_get_tgt_type(struct wlan_objmgr_psoc *psoc)
return 0;
}
tgt_hdl = (struct target_psoc_info *)wlan_psoc_get_tgt_if_handle(
psoc);
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
if (!tgt_hdl) {
target_if_err("target_psoc_info is null");
return 0;
@@ -188,8 +184,7 @@ uint32_t ucfg_get_tgt_version(struct wlan_objmgr_psoc *psoc)
return -EINVAL;
}
tgt_hdl = (struct target_psoc_info *)wlan_psoc_get_tgt_if_handle(
psoc);
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
if (!tgt_hdl) {
target_if_err("target_psoc_info is null");
return -EINVAL;
@@ -207,8 +202,7 @@ uint32_t ucfg_get_tgt_revision(struct wlan_objmgr_psoc *psoc)
return -EINVAL;
}
tgt_hdl = (struct target_psoc_info *)wlan_psoc_get_tgt_if_handle(
psoc);
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
if (!tgt_hdl) {
target_if_err("target_psoc_info is null");
return -EINVAL;
@@ -228,8 +222,7 @@ bool ucfg_is_target_ar900b(struct wlan_objmgr_psoc *psoc)
return false;
}
tgt_hdl = (struct target_psoc_info *)wlan_psoc_get_tgt_if_handle(
psoc);
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
if (!tgt_hdl) {
target_if_err("target_psoc_info is null");
return false;
@@ -248,6 +241,57 @@ bool ucfg_is_target_ar900b(struct wlan_objmgr_psoc *psoc)
return false;
}
void *ucfg_get_wmi_hdl(struct wlan_objmgr_psoc *psoc)
{
struct target_psoc_info *tgt_hdl;
if (!psoc) {
target_if_err("psoc is null");
return NULL;
}
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
if (!tgt_hdl) {
target_if_err("target_psoc_info is null");
return NULL;
}
return target_psoc_get_wmi_hdl(tgt_hdl);
}
void *ucfg_get_htc_hdl(struct wlan_objmgr_psoc *psoc)
{
struct target_psoc_info *tgt_hdl;
if (!psoc) {
target_if_err("psoc is null");
return NULL;
}
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
if (!tgt_hdl) {
target_if_err("target_psoc_info is null");
return NULL;
}
return target_psoc_get_htc_hdl(tgt_hdl);
}
void *ucfg_get_hif_hdl(struct wlan_objmgr_psoc *psoc)
{
struct target_psoc_info *tgt_hdl;
if (!psoc) {
target_if_err("psoc is null");
return NULL;
}
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
if (!tgt_hdl) {
target_if_err("target_psoc_info is null");
return NULL;
}
return target_psoc_get_hif_hdl(tgt_hdl);
}
void *ucfg_get_pdev_wmi_handle(struct wlan_objmgr_pdev *pdev)
{
struct target_pdev_info *tgt_hdl;
@@ -256,8 +300,7 @@ void *ucfg_get_pdev_wmi_handle(struct wlan_objmgr_pdev *pdev)
target_if_err("pdev is null");
return NULL;
}
tgt_hdl = (struct target_pdev_info *)wlan_pdev_get_tgt_if_handle(
pdev);
tgt_hdl = wlan_pdev_get_tgt_if_handle(pdev);
if (!tgt_hdl) {
target_if_err("target_pdev_info is null");
return NULL;