diff --git a/board/qca/arm/common/cmd_bootqca.c b/board/qca/arm/common/cmd_bootqca.c
index 0e01553..95353de 100644
--- a/board/qca/arm/common/cmd_bootqca.c
+++ b/board/qca/arm/common/cmd_bootqca.c
@@ -106,8 +106,7 @@
 
 }
 
-static int do_dumpqca_data(cmd_tbl_t *cmdtp, int flag, int argc,
-					char *const argv[])
+static int do_dumpqca_data(void)
 {
 	char *serverip = NULL;
 	/* dump to root of TFTP server if none specified */
@@ -120,18 +119,12 @@
 	struct dumpinfo_t *dumpinfo = dumpinfo_n;
 	int dump_entries = dump_entries_n;
 
-	if (argc == 2) {
-		serverip = argv[1];
-		printf("Using given serverip %s\n", serverip);
-		setenv("serverip", serverip);
+	serverip = getenv("serverip");
+	if (serverip != NULL) {
+		printf("Using serverip from env %s\n", serverip);
 	} else {
-		serverip = getenv("serverip");
-		if (serverip != NULL) {
-			printf("Using serverip from env %s\n", serverip);
-	} else {
-			printf("\nServer ip not found, run dhcp or configure\n");
-			return CMD_RET_FAILURE;
-		}
+		printf("\nServer ip not found, run dhcp or configure\n");
+		return CMD_RET_FAILURE;
 	}
 
 	ret = qca_scm_call(SCM_SVC_FUSE,
@@ -195,10 +188,6 @@
 	return CMD_RET_SUCCESS;
 }
 
-U_BOOT_CMD(dumpipq_data, 2, 0, do_dumpqca_data,
-	"dumpipq_data crashdump collection from memory",
-	"dumpipq_data [serverip] - Crashdump collection from memory vi tftp\n");
-
 /**
  * Inovke the dump routine and in case of failure, do not stop unless the user
  * requested to stop
@@ -208,7 +197,7 @@
 {
 	uint64_t etime;
 
-	if (run_command("dumpipq_data", 0) != CMD_RET_SUCCESS) {
+	if (do_dumpqca_data() != CMD_RET_SUCCESS) {
 		printf("\nAuto crashdump saving failed!"
 		       "\nPress any key within 10s to take control of U-Boot");
 
@@ -393,20 +382,27 @@
 	 */
 
 	int soc_version = 0;
-	const char *config = fdt_getprop(gd->fdt_blob, 0, "config_name", NULL);
+	const char *config = getenv("config_name");
 
-	if(config == NULL) {
-		printf("Failed to get config_name\n");
-		return -1;
-	}
+	if (config) {
+		printf("Manual device tree config selected!\n");
+		snprintf(dtb_config_name, strlen(dtb_config_name), config);
+	} else {
+		config = fdt_getprop(gd->fdt_blob, 0, "config_name", NULL);
 
-	sprintf((char *)dtb_config_name, "%s", config);
+		if(config == NULL) {
+			printf("Failed to get config_name\n");
+			return -1;
+		}
 
-	ipq_smem_get_socinfo_version((uint32_t *)&soc_version);
-	if(SOCINFO_VERSION_MAJOR(soc_version) >= 2) {
-		sprintf(dtb_config_name + strlen("config@"), "v%d.0-%s",
-			SOCINFO_VERSION_MAJOR(soc_version),
-			config + strlen("config@"));
+		sprintf((char *)dtb_config_name, "%s", config);
+
+		ipq_smem_get_socinfo_version((uint32_t *)&soc_version);
+		if(SOCINFO_VERSION_MAJOR(soc_version) >= 2) {
+			sprintf(dtb_config_name + strlen("config@"), "v%d.0-%s",
+					SOCINFO_VERSION_MAJOR(soc_version),
+					config + strlen("config@"));
+		}
 	}
 
 	if (fit_conf_get_node((void *)addr, dtb_config_name) >= 0) {
