};
/* AR6003 1.0 definitions */
-#define AR6003_REV1_VERSION 0x300002ba
+#define AR6003_HW_1_0_VERSION 0x300002ba
/* AR6003 2.0 definitions */
-#define AR6003_REV2_VERSION 0x30000384
-#define AR6003_REV2_PATCH_DOWNLOAD_ADDRESS 0x57e910
-#define AR6003_REV2_OTP_FILE "ath6k/AR6003/hw2.0/otp.bin.z77"
-#define AR6003_REV2_FIRMWARE_FILE "ath6k/AR6003/hw2.0/athwlan.bin.z77"
-#define AR6003_REV2_TCMD_FIRMWARE_FILE "ath6k/AR6003/hw2.0/athtcmd_ram.bin"
-#define AR6003_REV2_PATCH_FILE "ath6k/AR6003/hw2.0/data.patch.bin"
-#define AR6003_REV2_FIRMWARE_2_FILE "ath6k/AR6003/hw2.0/fw-2.bin"
-#define AR6003_REV2_BOARD_DATA_FILE "ath6k/AR6003/hw2.0/bdata.bin"
-#define AR6003_REV2_DEFAULT_BOARD_DATA_FILE "ath6k/AR6003/hw2.0/bdata.SD31.bin"
+#define AR6003_HW_2_0_VERSION 0x30000384
+#define AR6003_HW_2_0_PATCH_DOWNLOAD_ADDRESS 0x57e910
+#define AR6003_HW_2_0_OTP_FILE "ath6k/AR6003/hw2.0/otp.bin.z77"
+#define AR6003_HW_2_0_FIRMWARE_FILE "ath6k/AR6003/hw2.0/athwlan.bin.z77"
+#define AR6003_HW_2_0_TCMD_FIRMWARE_FILE "ath6k/AR6003/hw2.0/athtcmd_ram.bin"
+#define AR6003_HW_2_0_PATCH_FILE "ath6k/AR6003/hw2.0/data.patch.bin"
+#define AR6003_HW_2_0_FIRMWARE_2_FILE "ath6k/AR6003/hw2.0/fw-2.bin"
+#define AR6003_HW_2_0_BOARD_DATA_FILE "ath6k/AR6003/hw2.0/bdata.bin"
+#define AR6003_HW_2_0_DEFAULT_BOARD_DATA_FILE \
+ "ath6k/AR6003/hw2.0/bdata.SD31.bin"
/* AR6003 3.0 definitions */
-#define AR6003_REV3_VERSION 0x30000582
-#define AR6003_REV3_OTP_FILE "ath6k/AR6003/hw2.1.1/otp.bin"
-#define AR6003_REV3_FIRMWARE_FILE "ath6k/AR6003/hw2.1.1/athwlan.bin"
-#define AR6003_REV3_TCMD_FIRMWARE_FILE "ath6k/AR6003/hw2.1.1/athtcmd_ram.bin"
-#define AR6003_REV3_PATCH_FILE "ath6k/AR6003/hw2.1.1/data.patch.bin"
-#define AR6003_REV3_FIRMWARE_2_FILE "ath6k/AR6003/hw2.1.1/fw-2.bin"
-#define AR6003_REV3_BOARD_DATA_FILE "ath6k/AR6003/hw2.1.1/bdata.bin"
-#define AR6003_REV3_DEFAULT_BOARD_DATA_FILE \
- "ath6k/AR6003/hw2.1.1/bdata.SD31.bin"
+#define AR6003_HW_2_1_1_VERSION 0x30000582
+#define AR6003_HW_2_1_1_OTP_FILE "ath6k/AR6003/hw2.1.1/otp.bin"
+#define AR6003_HW_2_1_1_FIRMWARE_FILE "ath6k/AR6003/hw2.1.1/athwlan.bin"
+#define AR6003_HW_2_1_1_TCMD_FIRMWARE_FILE \
+ "ath6k/AR6003/hw2.1.1/athtcmd_ram.bin"
+#define AR6003_HW_2_1_1_PATCH_FILE "ath6k/AR6003/hw2.1.1/data.patch.bin"
+#define AR6003_HW_2_1_1_FIRMWARE_2_FILE "ath6k/AR6003/hw2.1.1/fw-2.bin"
+#define AR6003_HW_2_1_1_BOARD_DATA_FILE "ath6k/AR6003/hw2.1.1/bdata.bin"
+#define AR6003_HW_2_1_1_DEFAULT_BOARD_DATA_FILE \
+ "ath6k/AR6003/hw2.1.1/bdata.SD31.bin"
/* AR6004 1.0 definitions */
-#define AR6004_REV1_VERSION 0x30000623
-#define AR6004_REV1_FIRMWARE_2_FILE "ath6k/AR6004/hw1.0/fw-2.bin"
-#define AR6004_REV1_FIRMWARE_FILE "ath6k/AR6004/hw1.0/fw.ram.bin"
-#define AR6004_REV1_BOARD_DATA_FILE "ath6k/AR6004/hw1.0/bdata.bin"
-#define AR6004_REV1_DEFAULT_BOARD_DATA_FILE \
+#define AR6004_HW_1_0_VERSION 0x30000623
+#define AR6004_HW_1_0_FIRMWARE_2_FILE "ath6k/AR6004/hw1.0/fw-2.bin"
+#define AR6004_HW_1_0_FIRMWARE_FILE "ath6k/AR6004/hw1.0/fw.ram.bin"
+#define AR6004_HW_1_0_BOARD_DATA_FILE "ath6k/AR6004/hw1.0/bdata.bin"
+#define AR6004_HW_1_0_DEFAULT_BOARD_DATA_FILE \
"ath6k/AR6004/hw1.0/bdata.DB132.bin"
/* AR6004 1.1 definitions */
-#define AR6004_REV2_VERSION 0x30000001
-#define AR6004_REV2_FIRMWARE_2_FILE "ath6k/AR6004/hw1.1/fw-2.bin"
-#define AR6004_REV2_FIRMWARE_FILE "ath6k/AR6004/hw1.1/fw.ram.bin"
-#define AR6004_REV2_BOARD_DATA_FILE "ath6k/AR6004/hw1.1/bdata.bin"
-#define AR6004_REV2_DEFAULT_BOARD_DATA_FILE \
+#define AR6004_HW_1_1_VERSION 0x30000001
+#define AR6004_HW_1_1_FIRMWARE_2_FILE "ath6k/AR6004/hw1.1/fw-2.bin"
+#define AR6004_HW_1_1_FIRMWARE_FILE "ath6k/AR6004/hw1.1/fw.ram.bin"
+#define AR6004_HW_1_1_BOARD_DATA_FILE "ath6k/AR6004/hw1.1/bdata.bin"
+#define AR6004_HW_1_1_DEFAULT_BOARD_DATA_FILE \
"ath6k/AR6004/hw1.1/bdata.DB132.bin"
/* Per STA data, used in AP mode */
static const struct ath6kl_hw hw_list[] = {
{
- .id = AR6003_REV2_VERSION,
+ .id = AR6003_HW_2_0_VERSION,
.name = "ar6003 hw 2.0",
.dataset_patch_addr = 0x57e884,
.app_load_addr = 0x543180,
.app_start_override_addr = 0x944C00,
},
{
- .id = AR6003_REV3_VERSION,
+ .id = AR6003_HW_2_1_1_VERSION,
.name = "ar6003 hw 2.1.1",
.dataset_patch_addr = 0x57ff74,
.app_load_addr = 0x1234,
.reserved_ram_size = 512,
},
{
- .id = AR6004_REV1_VERSION,
+ .id = AR6004_HW_1_0_VERSION,
.name = "ar6004 hw 1.0",
.dataset_patch_addr = 0x57e884,
.app_load_addr = 0x1234,
.board_addr = 0x433900,
},
{
- .id = AR6004_REV2_VERSION,
+ .id = AR6004_HW_1_1_VERSION,
.name = "ar6004 hw 1.1",
.dataset_patch_addr = 0x57e884,
.app_load_addr = 0x1234,
static const char *get_target_ver_dir(const struct ath6kl *ar)
{
switch (ar->version.target_ver) {
- case AR6003_REV1_VERSION:
+ case AR6003_HW_1_0_VERSION:
return "ath6k/AR6003/hw1.0";
- case AR6003_REV2_VERSION:
+ case AR6003_HW_2_0_VERSION:
return "ath6k/AR6003/hw2.0";
- case AR6003_REV3_VERSION:
+ case AR6003_HW_2_1_1_VERSION:
return "ath6k/AR6003/hw2.1.1";
}
ath6kl_warn("%s: unsupported target version 0x%x.\n", __func__,
return 0;
switch (ar->version.target_ver) {
- case AR6003_REV2_VERSION:
- filename = AR6003_REV2_BOARD_DATA_FILE;
+ case AR6003_HW_2_0_VERSION:
+ filename = AR6003_HW_2_0_BOARD_DATA_FILE;
break;
- case AR6004_REV1_VERSION:
- filename = AR6004_REV1_BOARD_DATA_FILE;
+ case AR6004_HW_1_0_VERSION:
+ filename = AR6004_HW_1_0_BOARD_DATA_FILE;
break;
default:
- filename = AR6003_REV3_BOARD_DATA_FILE;
+ filename = AR6003_HW_2_1_1_BOARD_DATA_FILE;
break;
}
filename, ret);
switch (ar->version.target_ver) {
- case AR6003_REV2_VERSION:
- filename = AR6003_REV2_DEFAULT_BOARD_DATA_FILE;
+ case AR6003_HW_2_0_VERSION:
+ filename = AR6003_HW_2_0_DEFAULT_BOARD_DATA_FILE;
break;
- case AR6004_REV1_VERSION:
- filename = AR6004_REV1_DEFAULT_BOARD_DATA_FILE;
+ case AR6004_HW_1_0_VERSION:
+ filename = AR6004_HW_1_0_DEFAULT_BOARD_DATA_FILE;
break;
default:
- filename = AR6003_REV3_DEFAULT_BOARD_DATA_FILE;
+ filename = AR6003_HW_2_1_1_DEFAULT_BOARD_DATA_FILE;
break;
}
return 0;
switch (ar->version.target_ver) {
- case AR6003_REV2_VERSION:
- filename = AR6003_REV2_OTP_FILE;
+ case AR6003_HW_2_0_VERSION:
+ filename = AR6003_HW_2_0_OTP_FILE;
break;
- case AR6004_REV1_VERSION:
+ case AR6004_HW_1_0_VERSION:
ath6kl_dbg(ATH6KL_DBG_TRC, "AR6004 doesn't need OTP file\n");
return 0;
break;
default:
- filename = AR6003_REV3_OTP_FILE;
+ filename = AR6003_HW_2_1_1_OTP_FILE;
break;
}
if (testmode) {
switch (ar->version.target_ver) {
- case AR6003_REV2_VERSION:
- filename = AR6003_REV2_TCMD_FIRMWARE_FILE;
+ case AR6003_HW_2_0_VERSION:
+ filename = AR6003_HW_2_0_TCMD_FIRMWARE_FILE;
break;
- case AR6003_REV3_VERSION:
- filename = AR6003_REV3_TCMD_FIRMWARE_FILE;
+ case AR6003_HW_2_1_1_VERSION:
+ filename = AR6003_HW_2_1_1_TCMD_FIRMWARE_FILE;
break;
- case AR6004_REV1_VERSION:
+ case AR6004_HW_1_0_VERSION:
ath6kl_warn("testmode not supported with ar6004\n");
return -EOPNOTSUPP;
default:
}
switch (ar->version.target_ver) {
- case AR6003_REV2_VERSION:
- filename = AR6003_REV2_FIRMWARE_FILE;
+ case AR6003_HW_2_0_VERSION:
+ filename = AR6003_HW_2_0_FIRMWARE_FILE;
break;
- case AR6004_REV1_VERSION:
- filename = AR6004_REV1_FIRMWARE_FILE;
+ case AR6004_HW_1_0_VERSION:
+ filename = AR6004_HW_1_0_FIRMWARE_FILE;
break;
default:
- filename = AR6003_REV3_FIRMWARE_FILE;
+ filename = AR6003_HW_2_1_1_FIRMWARE_FILE;
break;
}
int ret;
switch (ar->version.target_ver) {
- case AR6003_REV2_VERSION:
- filename = AR6003_REV2_PATCH_FILE;
+ case AR6003_HW_2_0_VERSION:
+ filename = AR6003_HW_2_0_PATCH_FILE;
break;
- case AR6004_REV1_VERSION:
+ case AR6004_HW_1_0_VERSION:
/* FIXME: implement for AR6004 */
return 0;
break;
default:
- filename = AR6003_REV3_PATCH_FILE;
+ filename = AR6003_HW_2_1_1_PATCH_FILE;
break;
}
__le32 *val;
switch (ar->version.target_ver) {
- case AR6003_REV2_VERSION:
- filename = AR6003_REV2_FIRMWARE_2_FILE;
+ case AR6003_HW_2_0_VERSION:
+ filename = AR6003_HW_2_0_FIRMWARE_2_FILE;
break;
- case AR6003_REV3_VERSION:
- filename = AR6003_REV3_FIRMWARE_2_FILE;
+ case AR6003_HW_2_1_1_VERSION:
+ filename = AR6003_HW_2_1_1_FIRMWARE_2_FILE;
break;
- case AR6004_REV1_VERSION:
- filename = AR6004_REV1_FIRMWARE_2_FILE;
+ case AR6004_HW_1_0_VERSION:
+ filename = AR6004_HW_1_0_FIRMWARE_2_FILE;
break;
- case AR6004_REV2_VERSION:
- filename = AR6004_REV2_FIRMWARE_2_FILE;
+ case AR6004_HW_1_1_VERSION:
+ filename = AR6004_HW_1_1_FIRMWARE_2_FILE;
break;
default:
return -EOPNOTSUPP;
return status;
/* WAR to avoid SDIO CRC err */
- if (ar->version.target_ver == AR6003_REV2_VERSION) {
+ if (ar->version.target_ver == AR6003_HW_2_0_VERSION) {
ath6kl_err("temporary war to avoid sdio crc error\n");
param = 0x20;