[PATCH 2/3] AR6k: don't reset on shutdown

Werner Almesberger werner at openmoko.org
Mon Jan 19 20:50:18 CET 2009


The AR6k driver can explicitly reset the module when shutting down the
device, which takes about two seconds and seems to be rather useless,
considering that we disable the entire SDIO function moments later.

This patch adds the configuration option CONFIG_AR6000_WLAN_RESET that
has to be set to maintain the previous default of resetting on shutdown.
The option is turned off by default.

Signed-off-by: Werner Almesberger <werner at openmoko.org>

---

Index: ktrack/drivers/ar6000/Kconfig
===================================================================
--- ktrack.orig/drivers/ar6000/Kconfig	2009-01-19 16:24:35.000000000 -0200
+++ ktrack/drivers/ar6000/Kconfig	2009-01-19 16:28:10.000000000 -0200
@@ -16,3 +16,16 @@
 	  this data is very slow, taking several seconds.
 
 	  If in doubt, say N.
+
+config AR6000_WLAN_RESET
+	bool "Soft-reset when shutting down"
+	depends on AR6000_WLAN
+	default n
+	help
+	  The AR6k module can be explicitly reset when shutting down
+	  the device. This adds a delay of about two seconds to suspend,
+	  module removal, and so on. Since the WLAN SDIO function is
+	  generally disabled soon thereafter anyway, this reset seems
+	  superfluous.
+
+	  If in doubt, say N.
Index: ktrack/drivers/ar6000/ar6000/ar6000_drv.c
===================================================================
--- ktrack.orig/drivers/ar6000/ar6000/ar6000_drv.c	2009-01-19 16:22:09.000000000 -0200
+++ ktrack/drivers/ar6000/ar6000/ar6000_drv.c	2009-01-19 16:26:44.000000000 -0200
@@ -117,6 +117,12 @@
 unsigned int mboxnum = HTC_MAILBOX_NUM_MAX;
 #endif
 
+#ifdef CONFIG_AR6000_WLAN_RESET
+unsigned int resetok = 1;
+#else
+unsigned int resetok = 0;
+#endif
+
 #ifdef DEBUG
 A_UINT32 g_dbg_flags = DBG_DEFAULTS;
 unsigned int debugflags = 0;
@@ -124,7 +130,6 @@
 unsigned int debughtc = 128;
 unsigned int debugbmi = 1;
 unsigned int debughif = 2;
-unsigned int resetok = 1;
 unsigned int txcreditsavailable[HTC_MAILBOX_NUM_MAX] = {0};
 unsigned int txcreditsconsumed[HTC_MAILBOX_NUM_MAX] = {0};
 unsigned int txcreditintrenable[HTC_MAILBOX_NUM_MAX] = {0};
@@ -155,9 +160,6 @@
 MODULE_PARM(txcreditintrenableaggregate, "0-3i");
 #endif
 
-#else
-unsigned int resetok = 1;
-
 #endif /* DEBUG */
 
 unsigned int tx_attempt[HTC_MAILBOX_NUM_MAX] = {0};



More information about the openmoko-kernel mailing list