aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/configs/gta02-moredrivers-defconfig2
-rw-r--r--drivers/ar6000/Kconfig24
-rw-r--r--drivers/ar6000/ar6000/ar6000_drv.c13
3 files changed, 35 insertions, 4 deletions
diff --git a/arch/arm/configs/gta02-moredrivers-defconfig b/arch/arm/configs/gta02-moredrivers-defconfig
index 1184e790d80..1bab0eee69b 100644
--- a/arch/arm/configs/gta02-moredrivers-defconfig
+++ b/arch/arm/configs/gta02-moredrivers-defconfig
@@ -1591,6 +1591,8 @@ CONFIG_USB_ETH_RNDIS=y
# CONFIG_USB_G_PRINTER is not set
# CONFIG_USB_CDC_COMPOSITE is not set
CONFIG_AR6000_WLAN=y
+# CONFIG_AR6000_WLAN_DEBUG is not set
+# CONFIG_AR6000_WLAN_RESET is not set
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
CONFIG_MMC_UNSAFE_RESUME=y
diff --git a/drivers/ar6000/Kconfig b/drivers/ar6000/Kconfig
index 67fb9643464..a422cb0eef1 100644
--- a/drivers/ar6000/Kconfig
+++ b/drivers/ar6000/Kconfig
@@ -5,3 +5,27 @@ config AR6000_WLAN
default m
help
good luck.
+
+config AR6000_WLAN_DEBUG
+ bool "Enable retrieval of firmware debugging information"
+ depends on AR6000_WLAN
+ default n
+ help
+ The AR6k firmware maintains a log of debugging events that
+ gets flushed to the host on various occasions. Retrieval of
+ 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.
diff --git a/drivers/ar6000/ar6000/ar6000_drv.c b/drivers/ar6000/ar6000/ar6000_drv.c
index 77730b2a3ac..06042367379 100644
--- a/drivers/ar6000/ar6000/ar6000_drv.c
+++ b/drivers/ar6000/ar6000/ar6000_drv.c
@@ -117,6 +117,12 @@ unsigned int _mboxnum = HTC_MAILBOX_NUM_MAX;
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 @@ int debugdriver = 1;
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(txcreditintrenable, "0-3i");
MODULE_PARM(txcreditintrenableaggregate, "0-3i");
#endif
-#else
-unsigned int resetok = 1;
-
#endif /* DEBUG */
unsigned int tx_attempt[HTC_MAILBOX_NUM_MAX] = {0};
@@ -402,6 +404,9 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar)
if (!ar->dbglog_init_done) return A_ERROR;
+#ifndef CONFIG_AR6000_WLAN_DEBUG
+ return 0;
+#endif
AR6000_SPIN_LOCK(&ar->arLock, 0);