summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/init.c
diff options
context:
space:
mode:
authorKalle Valo <kvalo@qca.qualcomm.com>2011-09-01 10:14:21 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2011-09-01 10:14:21 +0300
commit003353b0d27489228eff79447d0731687cea0207 (patch)
tree3ab9eb674f092be48fd314d75fa8d0811064f958 /drivers/net/wireless/ath/ath6kl/init.c
parent4495ab167044d3ba3127dac06762138f5122ddc9 (diff)
ath6kl: add testmode support
This is port from the staging version of ath6kl. The interface to user space is exactly same. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/init.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/init.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index 32b7ef5e2ac..f348357279a 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -23,8 +23,10 @@
#include "hif-ops.h"
unsigned int debug_mask;
+static unsigned int testmode;
module_param(debug_mask, uint, 0644);
+module_param(testmode, uint, 0644);
/*
* Include definitions here that can be used to tune the WLAN module
@@ -901,6 +903,28 @@ static int ath6kl_upload_firmware(struct ath6kl *ar)
u32 address;
int ret;
+ if (testmode) {
+ switch (ar->version.target_ver) {
+ case AR6003_REV2_VERSION:
+ filename = AR6003_REV2_TCMD_FIRMWARE_FILE;
+ break;
+ case AR6003_REV3_VERSION:
+ filename = AR6003_REV3_TCMD_FIRMWARE_FILE;
+ break;
+ case AR6004_REV1_VERSION:
+ ath6kl_warn("testmode not supported with ar6004\n");
+ return -EOPNOTSUPP;
+ default:
+ ath6kl_warn("unknown target version: 0x%x\n",
+ ar->version.target_ver);
+ return -EINVAL;
+ }
+
+ set_bit(TESTMODE, &ar->flag);
+
+ goto get_fw;
+ }
+
switch (ar->version.target_ver) {
case AR6003_REV2_VERSION:
filename = AR6003_REV2_FIRMWARE_FILE;
@@ -913,6 +937,8 @@ static int ath6kl_upload_firmware(struct ath6kl *ar)
break;
}
+get_fw:
+
if (ar->fw == NULL) {
ret = ath6kl_get_fw(ar, filename, &ar->fw, &ar->fw_len);
if (ret) {