qcacmn: add support for CoAP

Add support for Constrained Application Protocol.

Change-Id: I425206a990778cf946a4805192eff4d54562a945
CRs-Fixed: 3254128
This commit is contained in:
Yu Wang
2022-07-27 14:33:31 +08:00
committed by Madan Koyyalamudi
부모 6efe5cf271
커밋 67011a392c
8개의 변경된 파일168개의 추가작업 그리고 1개의 파일을 삭제

파일 보기

@@ -85,6 +85,10 @@
#include <wlan_twt_api.h>
#ifdef WLAN_FEATURE_COAP
#include <wlan_coap_main.h>
#endif
/**
* DOC: This file provides various init/deinit trigger point for new
* components.
@@ -1051,6 +1055,48 @@ static QDF_STATUS mlo_mgr_psoc_disable(struct wlan_objmgr_psoc *psoc)
}
#endif
#ifdef WLAN_FEATURE_COAP
static QDF_STATUS dispatcher_coap_init(void)
{
return wlan_coap_init();
}
static QDF_STATUS dispatcher_coap_deinit(void)
{
return wlan_coap_deinit();
}
static QDF_STATUS coap_psoc_enable(struct wlan_objmgr_psoc *psoc)
{
return wlan_coap_enable(psoc);
}
static QDF_STATUS coap_psoc_disable(struct wlan_objmgr_psoc *psoc)
{
return wlan_coap_disable(psoc);
}
#else
static QDF_STATUS dispatcher_coap_init(void)
{
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS dispatcher_coap_deinit(void)
{
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS coap_psoc_enable(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS coap_psoc_disable(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}
#endif
QDF_STATUS dispatcher_init(void)
{
if (QDF_STATUS_SUCCESS != wlan_objmgr_global_obj_init())
@@ -1137,6 +1183,9 @@ QDF_STATUS dispatcher_init(void)
if (QDF_STATUS_SUCCESS != dispatcher_twt_init())
goto twt_init_fail;
if (QDF_STATUS_SUCCESS != dispatcher_coap_init())
goto coap_init_fail;
/*
* scheduler INIT has to be the last as each component's
* initialization has to happen first and then at the end
@@ -1148,6 +1197,8 @@ QDF_STATUS dispatcher_init(void)
return QDF_STATUS_SUCCESS;
scheduler_init_fail:
dispatcher_coap_deinit();
coap_init_fail:
dispatcher_twt_deinit();
twt_init_fail:
wlan_gpio_deinit();
@@ -1215,6 +1266,8 @@ QDF_STATUS dispatcher_deinit(void)
QDF_BUG(QDF_STATUS_SUCCESS == scheduler_deinit());
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_coap_deinit());
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_twt_deinit());
QDF_BUG(QDF_STATUS_SUCCESS == wlan_gpio_deinit());
@@ -1448,8 +1501,13 @@ QDF_STATUS dispatcher_psoc_enable(struct wlan_objmgr_psoc *psoc)
if (QDF_STATUS_SUCCESS != dbam_psoc_enable(psoc))
goto dbam_psoc_enable_fail;
if (QDF_STATUS_SUCCESS != coap_psoc_enable(psoc))
goto coap_psoc_enable_fail;
return QDF_STATUS_SUCCESS;
coap_psoc_enable_fail:
dbam_psoc_disable(psoc);
dbam_psoc_enable_fail:
dispatcher_twt_psoc_disable(psoc);
twt_psoc_enable_fail:
@@ -1491,6 +1549,8 @@ QDF_STATUS dispatcher_psoc_disable(struct wlan_objmgr_psoc *psoc)
{
QDF_STATUS status;
QDF_BUG(QDF_STATUS_SUCCESS == coap_psoc_disable(psoc));
QDF_BUG(QDF_STATUS_SUCCESS == dbam_psoc_disable(psoc));
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_twt_psoc_disable(psoc));