Browse Source

qcacld-3.0: Create sysfs file and ini for direct link unit test

Create sysfs file for direct link unit test command to
generate traffic from LPASS.
Add ini to enable direct link unit testing.

Change-Id: I5b143bc6751eedb1a65cd836ea738744b72cc2cc
CRs-Fixed: 3365576
Ananya Gupta 2 years ago
parent
commit
ec471e92f2
3 changed files with 29 additions and 2 deletions
  1. 4 0
      Kbuild
  2. 21 1
      components/dp/dispatcher/inc/wlan_dp_cfg.h
  3. 4 1
      core/hdd/src/wlan_hdd_sysfs.c

+ 4 - 0
Kbuild

@@ -462,6 +462,10 @@ endif
 ifeq ($(CONFIG_WLAN_SYSFS_EHT_RATE), y)
 HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_eht_rate.o
 endif
+
+ifeq ($(CONFIG_FEATURE_DIRECT_LINK), y)
+HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_direct_link_ut_cmd.o
+endif
 endif # CONFIG_WLAN_SYSFS
 
 ifeq ($(CONFIG_QCACLD_FEATURE_FW_STATE), y)

+ 21 - 1
components/dp/dispatcher/inc/wlan_dp_cfg.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-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
@@ -1174,6 +1174,25 @@
 		    CFG_VALUE_OR_DEFAULT, \
 		    "Interval to mark ICMP Request packets to be sent to FW")
 
+/*
+ * <ini>
+ * enable_direct_link_ut_cmd - Enable direct link unit testing
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to enable direct link unit test
+ *
+ * Supported feature: Direct link
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_ENABLE_DIRECT_LINK_UT_CMD \
+	CFG_INI_BOOL("enable_direct_link_ut_cmd", false, \
+		     "enable/disable direct link unit test")
+
 /*TODO Flow control part to be moved to DP later*/
 
 #ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH
@@ -1238,6 +1257,7 @@
 	CFG(CFG_DP_RX_WAKELOCK_TIMEOUT) \
 	CFG(CFG_DP_NUM_DP_RX_THREADS) \
 	CFG(CFG_DP_ICMP_REQ_TO_FW_MARK_INTERVAL) \
+	CFG(CFG_ENABLE_DIRECT_LINK_UT_CMD) \
 	CFG_DP_ENABLE_FASTPATH_ALL \
 	CFG_DP_BUS_BANDWIDTH \
 	CFG_DP_DRIVER_TCP_DELACK \

+ 4 - 1
core/hdd/src/wlan_hdd_sysfs.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-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
@@ -88,6 +88,7 @@
 #include <wlan_hdd_sysfs_wifi_features.h>
 #include <wlan_hdd_sysfs_dp_traffic_end_indication.h>
 #include <wlan_hdd_sysfs_eht_rate.h>
+#include <wlan_hdd_sysfs_direct_link_ut_cmd.h>
 
 #define MAX_PSOC_ID_SIZE 10
 
@@ -842,11 +843,13 @@ hdd_sysfs_create_sap_adapter_root_obj(struct hdd_adapter *adapter)
 	hdd_sysfs_11be_rate_create(adapter);
 	hdd_sysfs_dp_tx_delay_stats_create(adapter);
 	hdd_sysfs_dp_traffic_end_indication_create(adapter);
+	hdd_sysfs_direct_link_ut_cmd_create(adapter);
 }
 
 static void
 hdd_sysfs_destroy_sap_adapter_root_obj(struct hdd_adapter *adapter)
 {
+	hdd_sysfs_direct_link_ut_destroy(adapter);
 	hdd_sysfs_dp_traffic_end_indication_destroy(adapter);
 	hdd_sysfs_dp_tx_delay_stats_destroy(adapter);
 	hdd_sysfs_11be_rate_destroy(adapter);