Browse Source

qcacld-3.0: Create new component for low latency sap

This change creates a new component for low latency SAP
and also does the init and de-init of this new component.

Change-Id: I4a8192feb6edb30b1898ef30675cbc01235a8e42
CRs-Fixed: 3482510
Ashish Kumar Dhanotiya 1 year ago
parent
commit
b1fac44abe

+ 13 - 0
Kbuild

@@ -1607,6 +1607,18 @@ MLME_INC += $(WFA_INC)
 MLME_OBJS += $(WFA_TGT_IF_DIR)/src/target_if_wfa_testcmd.o \
 		$(WFA_DIR)/dispatcher/src/wlan_wfa_tgt_if_tx_api.o
 
+####### LL_SAP #######
+LL_SAP_DIR := components/umac/mlme/sap/ll_sap
+
+LL_SAP_INC := -I$(WLAN_ROOT)/$(LL_SAP_DIR)/dispatcher/inc \
+
+MLME_INC += $(LL_SAP_INC)
+
+ifeq ($(CONFIG_WLAN_FEATURE_LL_LT_SAP), y)
+MLME_OBJS += $(LL_SAP_DIR)/dispatcher/src/wlan_ll_sap_ucfg_api.o \
+		$(LL_SAP_DIR)/core/src/wlan_ll_sap_main.o
+endif
+
 $(call add-wlan-objs,mlme,$(MLME_OBJS))
 
 ####### DENYLIST_MGR ########
@@ -4384,6 +4396,7 @@ ccflags-$(CONFIG_SAR_SAFETY_FEATURE) += -DSAR_SAFETY_FEATURE
 
 ccflags-$(CONFIG_CONNECTION_ROAMING_CFG) += -DCONNECTION_ROAMING_CFG
 ccflags-$(CONFIG_FEATURE_SET) += -DFEATURE_SET
+ccflags-$(CONFIG_WLAN_FEATURE_LL_LT_SAP) += -DWLAN_FEATURE_LL_LT_SAP
 
 ccflags-$(CONFIG_WLAN_FEATURE_NEAR_FULL_IRQ) += -DWLAN_FEATURE_NEAR_FULL_IRQ
 ccflags-$(CONFIG_WLAN_FEATURE_DP_EVENT_HISTORY) += -DWLAN_FEATURE_DP_EVENT_HISTORY

+ 4 - 0
Kconfig

@@ -96,6 +96,10 @@ config WLAN_FEATURE_FIPS
 	bool "Enable FIPS certification feature"
 	default n
 
+config WLAN_FEATURE_LL_LT_SAP
+	bool "Enable Low latency low throughput SAP feature"
+	default n
+
 config WLAN_FEATURE_LPSS
 	bool "Enable the WLAN LPSS feature"
 	default n

+ 99 - 0
components/umac/mlme/sap/ll_sap/core/src/wlan_ll_sap_main.c

@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2023 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.
+ */
+
+#include "wlan_ll_sap_main.h"
+#include <wlan_objmgr_global_obj.h>
+
+static QDF_STATUS ll_sap_psoc_obj_created_notification(struct wlan_objmgr_psoc *psoc, void *arg_list)
+{
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
+
+	QDF_TRACE_DEBUG(QDF_MODULE_ID_LL_SAP, "ll sap psoc object created");
+
+	/* attach ll_sap_psoc object which will contain cfg items,
+	 * tx and rx ops
+	 */
+	return status;
+}
+
+static QDF_STATUS ll_sap_psoc_obj_destroyed_notification(struct wlan_objmgr_psoc *psoc, void *arg_list)
+{
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
+
+	QDF_TRACE_DEBUG(QDF_MODULE_ID_LL_SAP,
+			"ll sap psoc object destroyed");
+
+	/* detach ll_sap_psoc object which will contain cfg items,
+	 * tx and rx ops
+	 */
+
+	return status;
+}
+
+QDF_STATUS ll_sap_init(void)
+{
+	QDF_STATUS status;
+
+	/* register psoc create handler functions. */
+	status = wlan_objmgr_register_psoc_create_handler(WLAN_UMAC_COMP_LL_SAP,
+							  ll_sap_psoc_obj_created_notification,
+							  NULL);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		QDF_TRACE_ERROR(QDF_MODULE_ID_LL_SAP,
+				"objmgr_register_psoc_create_handler failed");
+		return status;
+	}
+
+	/* register psoc delete handler functions. */
+	status = wlan_objmgr_register_psoc_destroy_handler(WLAN_UMAC_COMP_LL_SAP,
+							   ll_sap_psoc_obj_destroyed_notification,
+							   NULL);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		QDF_TRACE_ERROR(QDF_MODULE_ID_LL_SAP,
+				"objmgr_register_psoc_destroy_handler failed");
+		wlan_objmgr_unregister_psoc_create_handler(WLAN_UMAC_COMP_LL_SAP,
+							   ll_sap_psoc_obj_created_notification,
+							   NULL);
+	}
+	return status;
+}
+
+QDF_STATUS ll_sap_deinit(void)
+{
+	QDF_STATUS ret = QDF_STATUS_SUCCESS, status;
+
+	/* unregister psoc destroy handler functions. */
+	status = wlan_objmgr_unregister_psoc_destroy_handler(WLAN_UMAC_COMP_LL_SAP,
+							     ll_sap_psoc_obj_destroyed_notification,
+							     NULL);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		QDF_TRACE_ERROR(QDF_MODULE_ID_LL_SAP,
+				"objmgr_deregister_psoc_destroy_handler failed");
+		ret = status;
+	}
+
+	/* unregister psoc create handler functions. */
+	status = wlan_objmgr_unregister_psoc_create_handler(WLAN_UMAC_COMP_LL_SAP,
+							    ll_sap_psoc_obj_created_notification,
+							    NULL);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		QDF_TRACE_ERROR(QDF_MODULE_ID_LL_SAP,
+				"objmgr_unregister_psoc_create_handler failed");
+		ret = status;
+	}
+
+	return ret;
+}

+ 42 - 0
components/umac/mlme/sap/ll_sap/core/src/wlan_ll_sap_main.h

@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2023 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: contains ll_sap_definitions specific to the ll_sap module
+ */
+
+#ifndef _WLAN_LL_SAP_MAIN_H_
+#define _WLAN_LL_SAP_MAIN_H_
+
+#include "wlan_objmgr_psoc_obj.h"
+
+/**
+ * ll_sap_init() - initializes ll_sap component
+ *
+ * Return: QDF status
+ */
+QDF_STATUS ll_sap_init(void);
+
+/**
+ * ll_sap_deinit() - De-initializes ll_sap component
+ *
+ * Return: QDF status
+ */
+QDF_STATUS ll_sap_deinit(void);
+
+#endif /* _WLAN_LL_SAP_MAIN_H_ */

+ 55 - 0
components/umac/mlme/sap/ll_sap/dispatcher/inc/wlan_ll_sap_ucfg_api.h

@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2023 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: This file contains ll_sap north bound interface declarations
+ */
+
+#ifndef _WLAN_LL_SAP_UCFG_API_H_
+#define _WLAN_LL_SAP_UCFG_API_H_
+
+#ifdef WLAN_FEATURE_LL_LT_SAP
+
+/**
+ * ucfg_ll_sap_init() - initializes ll_sap component
+ *
+ * Return: QDF status
+ */
+QDF_STATUS ucfg_ll_sap_init(void);
+
+/**
+ * ucfg_ll_sap_deinit() - De-initializes ll_sap component
+ *
+ * Return: QDF status
+ */
+QDF_STATUS ucfg_ll_sap_deinit(void);
+
+#else
+static inline QDF_STATUS ucfg_ll_sap_init(void)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static inline QDF_STATUS ucfg_ll_sap_deinit(void)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+#endif /* WLAN_FEATURE_LL_LT_SAP */
+#endif /* _WLAN_LL_SAP_UCFG_API_H_ */
+

+ 34 - 0
components/umac/mlme/sap/ll_sap/dispatcher/src/wlan_ll_sap_ucfg_api.c

@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2023 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: This file contains ll_sap north bound interface definitions
+ */
+#include "../../core/src/wlan_ll_sap_main.h"
+#include <wlan_ll_sap_ucfg_api.h>
+
+QDF_STATUS ucfg_ll_sap_init(void)
+{
+	return ll_sap_init();
+}
+
+QDF_STATUS ucfg_ll_sap_deinit(void)
+{
+	return ll_sap_deinit();
+}
+

+ 9 - 0
core/hdd/src/wlan_hdd_main.c

@@ -242,6 +242,7 @@
 #include "wlan_qmi_ucfg_api.h"
 #include "ce_api.h"
 #include "wlan_psoc_mlme_ucfg_api.h"
+#include "wlan_ll_sap_ucfg_api.h"
 
 #include "os_if_dp_local_pkt_capture.h"
 #include "cdp_txrx_mon.h"
@@ -462,6 +463,7 @@ static const struct category_info cinfo[MAX_SUPPORTED_CATEGORY] = {
 	[QDF_MODULE_ID_WLAN_PRE_CAC] = {QDF_TRACE_LEVEL_ALL},
 	[QDF_MODULE_ID_COAP] = {QDF_TRACE_LEVEL_ALL},
 	[QDF_MODULE_ID_MON_FILTER] = {QDF_DATA_PATH_TRACE_LEVEL},
+	[QDF_MODULE_ID_LL_SAP] = {QDF_TRACE_LEVEL_ALL},
 };
 
 struct notifier_block hdd_netdev_notifier;
@@ -18102,8 +18104,14 @@ static QDF_STATUS hdd_component_init(void)
 	if (QDF_IS_STATUS_ERROR(status))
 		goto dp_deinit;
 
+	status = ucfg_ll_sap_init();
+	if (QDF_IS_STATUS_ERROR(status))
+		goto qmi_deinit;
+
 	return QDF_STATUS_SUCCESS;
 
+qmi_deinit:
+	ucfg_qmi_deinit();
 dp_deinit:
 	ucfg_dp_deinit();
 pre_cac_deinit:
@@ -18154,6 +18162,7 @@ mlme_global_deinit:
 static void hdd_component_deinit(void)
 {
 	/* deinitialize non-converged components */
+	ucfg_ll_sap_deinit();
 	ucfg_qmi_deinit();
 	ucfg_dp_deinit();
 	ucfg_pre_cac_deinit();