[qca-nss-drv] support customer crash dump.

write value not in 0/1 to /proc/sys/dev/nss/general/coredump
to disable panic when NSS FW crashes, so developers will have
a chance to collect crash dump (coredump) by using mdump utility:
see qsdk/qca/feeds/nss/mdump/src/README to details of using mdump.

Change-Id: I686ca3ff54bfa93f01f60dbdb8b2db7a3dbcda53
Signed-off-by: Guojun Jin <g.jin@codeaurora.org>
diff --git a/nss_init.c b/nss_init.c
index f35e793..05314b1 100644
--- a/nss_init.c
+++ b/nss_init.c
@@ -464,7 +464,12 @@
 
 	ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
 	if (!ret) {
-		if ((write) && (nss_ctl_debug != 0)) {
+		/*
+		 * if nss_cmd_buf.coredump is not 0 or 1, panic will be disabled
+		 * when NSS FW crashes, so OEM/ODM have a chance to use mdump
+		 * to dump crash dump (coredump) and send dump to us for analysis.
+		 */
+		if ((write) && (nss_ctl_debug != 0) && nss_cmd_buf.coredump == 1) {
 			printk("Coredumping to DDR\n");
 			nss_hal_send_interrupt(nss_ctx, NSS_H2N_INTR_TRIGGER_COREDUMP);
 		}