qcacld-3.0: Add support for QMI component

Add support for QMI component.

Change-Id: I63735800ea1166e875ff12bfd22df3c3d9c6312f
CRs-Fixed: 3337043
此提交包含在:
Yeshwanth Sriram Guntuka
2022-11-15 11:45:19 +05:30
提交者 Madan Koyyalamudi
父節點 ec079fcb49
當前提交 d2cc52d5ae
共有 11 個檔案被更改,包括 827 行新增0 行删除

查看文件

@@ -0,0 +1,91 @@
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/**
* DOC: wlan_qmi_ucfg_api.c
*
* QMI component north bound interface definitions
*/
#include "wlan_qmi_ucfg_api.h"
#include "wlan_qmi_main.h"
#include "wlan_qmi_objmgr.h"
#include "wlan_objmgr_global_obj.h"
#include "wlan_cmn.h"
QDF_STATUS ucfg_qmi_init(void)
{
QDF_STATUS status;
status = wlan_objmgr_register_psoc_create_handler(
WLAN_UMAC_COMP_QMI,
qmi_psoc_obj_create_notification, NULL);
if (QDF_IS_STATUS_ERROR(status)) {
qmi_err("Failed to register psoc create handler for QMI");
return status;
}
status = wlan_objmgr_register_psoc_destroy_handler(
WLAN_UMAC_COMP_QMI,
qmi_psoc_obj_destroy_notification, NULL);
if (QDF_IS_STATUS_ERROR(status)) {
qmi_err("Failed to register psoc destroy handler for QMI");
goto fail_destroy_psoc;
}
return status;
fail_destroy_psoc:
wlan_objmgr_unregister_psoc_create_handler(
WLAN_UMAC_COMP_QMI,
qmi_psoc_obj_create_notification, NULL);
return status;
}
QDF_STATUS ucfg_qmi_deinit(void)
{
QDF_STATUS status;
qmi_debug("QMI module dispatcher deinit");
status = wlan_objmgr_unregister_psoc_destroy_handler(
WLAN_UMAC_COMP_QMI,
qmi_psoc_obj_destroy_notification, NULL);
if (QDF_IS_STATUS_ERROR(status))
qmi_err("Failed to unregister QMI psoc delete handle:%d",
status);
status = wlan_objmgr_unregister_psoc_create_handler(
WLAN_UMAC_COMP_QMI,
qmi_psoc_obj_create_notification, NULL);
if (QDF_IS_STATUS_ERROR(status))
qmi_err("Failed to unregister QMI psoc create handle:%d",
status);
return status;
}
void ucfg_qmi_register_os_if_callbacks(struct wlan_objmgr_psoc *psoc,
struct wlan_qmi_psoc_callbacks *cb_obj)
{
struct wlan_qmi_psoc_context *qmi_ctx = qmi_psoc_get_priv(psoc);
if (!qmi_ctx) {
qmi_err("QMI context is NULL");
return;
}
}