ath6kl: Add a hardware flag for SDIO CRC error workaround
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Thu, 27 Sep 2012 12:49:53 +0000 (18:19 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 24 Oct 2012 08:49:57 +0000 (11:49 +0300)
Make use of SDIO CRC error workaround hardware flag and avoid
target revision checks.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/core.h
drivers/net/wireless/ath/ath6kl/init.c

index 1778bd3c732ecc50fedf0658136f1de8c1a786d4..189d8faf8c87f8bd36b16d8d40e568aa90fc98f5 100644 (file)
@@ -152,6 +152,7 @@ enum ath6kl_hw_flags {
        ATH6KL_HW_64BIT_RATES           = BIT(0),
        ATH6KL_HW_AP_INACTIVITY_MINS    = BIT(1),
        ATH6KL_HW_MAP_LP_ENDPOINT       = BIT(2),
+       ATH6KL_HW_SDIO_CRC_ERROR_WAR    = BIT(3),
 };
 
 #define ATH6KL_FW_API2_FILE "fw-2.bin"
index bb6aeea1c87f27789607e9d7934b3a078d92be39..f21fa322e5ca3e7245a994ebce2dc0ce48c82c7a 100644 (file)
@@ -42,7 +42,7 @@ static const struct ath6kl_hw hw_list[] = {
                .reserved_ram_size              = 6912,
                .refclk_hz                      = 26000000,
                .uarttx_pin                     = 8,
-               .flags                          = 0,
+               .flags                          = ATH6KL_HW_SDIO_CRC_ERROR_WAR,
 
                /* hw2.0 needs override address hardcoded */
                .app_start_override_addr        = 0x944C00,
@@ -68,7 +68,7 @@ static const struct ath6kl_hw hw_list[] = {
                .refclk_hz                      = 26000000,
                .uarttx_pin                     = 8,
                .testscript_addr                = 0x57ef74,
-               .flags                          = 0,
+               .flags                          = ATH6KL_HW_SDIO_CRC_ERROR_WAR,
 
                .fw = {
                        .dir            = AR6003_HW_2_1_1_FW_DIR,
@@ -1431,8 +1431,7 @@ static int ath6kl_init_upload(struct ath6kl *ar)
                return status;
 
        /* WAR to avoid SDIO CRC err */
-       if (ar->version.target_ver == AR6003_HW_2_0_VERSION ||
-           ar->version.target_ver == AR6003_HW_2_1_1_VERSION) {
+       if (ar->hw.flags & ATH6KL_HW_SDIO_CRC_ERROR_WAR) {
                ath6kl_err("temporary war to avoid sdio crc error\n");
 
                param = 0x28;