Browse Source

qcacld-3.0: Enable talloc feature

Enable the talloc feature, recently added in
I6308c96061e125b2e5a9c424ec2d2298c1c503ab.

Change-Id: I37c48d63dd1598710611d4c2ab5d26fec92c2250
CRs-Fixed: 2359468
Dustin Brown 6 years ago
parent
commit
d315c4570c
4 changed files with 18 additions and 1 deletions
  1. 4 0
      Kbuild
  2. 1 0
      configs/default_defconfig
  3. 11 1
      core/hdd/src/wlan_hdd_main.c
  4. 2 0
      core/hdd/src/wlan_hdd_wext.c

+ 4 - 0
Kbuild

@@ -554,6 +554,7 @@ QDF_OBJS := \
 	$(QDF_OBJ_DIR)/qdf_parse.o \
 	$(QDF_OBJ_DIR)/qdf_platform.o \
 	$(QDF_OBJ_DIR)/qdf_str.o \
+	$(QDF_OBJ_DIR)/qdf_talloc.o \
 	$(QDF_OBJ_DIR)/qdf_types.o \
 
 ifeq ($(CONFIG_WLAN_DEBUGFS), y)
@@ -576,10 +577,13 @@ endif
 
 ifeq ($(CONFIG_QDF_TEST), y)
 	QDF_OBJS += $(QDF_TEST_OBJ_DIR)/qdf_hashtable_test.o
+	QDF_OBJS += $(QDF_TEST_OBJ_DIR)/qdf_talloc_test.o
 	QDF_OBJS += $(QDF_TEST_OBJ_DIR)/qdf_types_test.o
 endif
 
+cppflags-$(CONFIG_TALLOC_DEBUG) += -DWLAN_TALLOC_DEBUG
 cppflags-$(CONFIG_QDF_TEST) += -DWLAN_HASHTABLE_TEST
+cppflags-$(CONFIG_QDF_TEST) += -DWLAN_TALLOC_TEST
 cppflags-$(CONFIG_QDF_TEST) += -DWLAN_TYPES_TEST
 
 ############ WBUFF ############

+ 1 - 0
configs/default_defconfig

@@ -653,6 +653,7 @@ ifeq ($(CONFIG_SLUB_DEBUG_ON), y)
 	CONFIG_LEAK_DETECTION := y
 	CONFIG_MAX_LOGS_PER_SEC := 500
 	CONFIG_SCHED_HISTORY_SIZE := 256
+	CONFIG_TALLOC_DEBUG := y
 	CONFIG_UNIT_TEST := y
 endif
 

+ 11 - 1
core/hdd/src/wlan_hdd_main.c

@@ -55,6 +55,7 @@
 #include "qdf_debug_domain.h"
 #endif
 #include "qdf_str.h"
+#include "qdf_talloc.h"
 #include "qdf_trace.h"
 #include "qdf_types.h"
 #include <cdp_txrx_peer_ops.h>
@@ -13242,10 +13243,16 @@ static QDF_STATUS hdd_qdf_init(void)
 	qdf_mc_timer_manager_init();
 	qdf_event_list_init();
 
+	status = qdf_talloc_feature_init();
+	if (QDF_IS_STATUS_ERROR(status)) {
+		hdd_err("Failed to init talloc; status:%u", status);
+		goto event_deinit;
+	}
+
 	status = qdf_cpuhp_init();
 	if (QDF_IS_STATUS_ERROR(status)) {
 		hdd_err("Failed to init cpuhp; status:%u", status);
-		goto event_deinit;
+		goto talloc_deinit;
 	}
 
 	status = qdf_trace_spin_lock_init();
@@ -13261,6 +13268,8 @@ static QDF_STATUS hdd_qdf_init(void)
 
 cpuhp_deinit:
 	qdf_cpuhp_deinit();
+talloc_deinit:
+	qdf_talloc_feature_deinit();
 event_deinit:
 	qdf_event_list_destroy();
 	qdf_mc_timer_manager_exit();
@@ -13283,6 +13292,7 @@ static void hdd_qdf_deinit(void)
 	/* currently, no trace spinlock deinit */
 
 	qdf_cpuhp_deinit();
+	qdf_talloc_feature_deinit();
 	qdf_event_list_destroy();
 	qdf_mc_timer_manager_exit();
 	qdf_mem_exit();

+ 2 - 0
core/hdd/src/wlan_hdd_wext.c

@@ -67,6 +67,7 @@
 #include "sme_api.h"
 #include "wma_types.h"
 #include "qdf_hashtable_test.h"
+#include "qdf_talloc_test.h"
 #include "qdf_str.h"
 #include "qdf_trace.h"
 #include "qdf_types_test.h"
@@ -5393,6 +5394,7 @@ struct hdd_ut_entry {
 struct hdd_ut_entry hdd_ut_entries[] = {
 	{ .name = "dsc", .callback = dsc_unit_test },
 	{ .name = "ht", .callback = qdf_ht_unit_test },
+	{ .name = "talloc", .callback = qdf_talloc_unit_test },
 	{ .name = "types", .callback = qdf_types_unit_test },
 };