Changeset 47262


Ignore:
Timestamp:
2015-10-26T10:01:34+01:00 (2 years ago)
Author:
blogic
Message:

ar71xx: fix ath79_soc_rev value for QCA9531 ver. 2

ath9k expects to get revision id 2 for the QCA9531 ver. 2 rev. 0. This
fixes the very low TX power on some devices like the TP-LINK
TL-WR841ND v10.

As ath79_soc_rev is only used to get the revision number to ath9k on the
QCA9533, just set it to the expected value on the ver. 2.

Signed-off-by: Matthias Schiffer <mschiffer@…>
Tested-by: Felix Kaechele <felix@…>

Location:
trunk/target/linux/ar71xx/patches-4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/patches-4.1/620-MIPS-ath79-add-support-for-QCA953x-SoC.patch

    r46430 r47262  
    414414        id = ath79_reset_rr(AR71XX_RESET_REG_REV_ID); 
    415415        major = id & REV_ID_MAJOR_MASK; 
    416 @@ -152,6 +153,16 @@ static void __init ath79_detect_sys_type 
     416@@ -152,6 +153,17 @@ static void __init ath79_detect_sys_type 
    417417                rev = id & AR934X_REV_ID_REVISION_MASK; 
    418418                break; 
     
    420420+       case REV_ID_MAJOR_QCA9533_V2: 
    421421+               ver = 2; 
     422+               ath79_soc_rev = 2; 
    422423+               /* drop through */ 
    423424+ 
     
    431432                ath79_soc = ATH79_SOC_QCA9556; 
    432433                chip = "9556"; 
    433 @@ -170,7 +181,7 @@ static void __init ath79_detect_sys_type 
    434   
    435         ath79_soc_rev = rev; 
     434@@ -168,11 +180,12 @@ static void __init ath79_detect_sys_type 
     435                panic("ath79: unknown SoC, id:0x%08x", id); 
     436        } 
     437  
     438-       ath79_soc_rev = rev; 
     439+       if (ver == 1) 
     440+               ath79_soc_rev = rev; 
    436441  
    437442-       if (soc_is_qca955x()) 
     443-               sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u", 
     444-                       chip, rev); 
    438445+       if (soc_is_qca953x() || soc_is_qca955x()) 
    439                 sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u", 
    440                         chip, rev); 
    441         else 
     446+               sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u", 
     447+                       chip, ver, rev); 
     448        else 
     449                sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev); 
     450        pr_info("SoC: %s\n", ath79_sys_type); 
    442451--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h 
    443452+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h 
  • trunk/target/linux/ar71xx/patches-4.1/621-MIPS-ath79-add-support-for-QCA956x-SoC.patch

    r46430 r47262  
    453453--- a/arch/mips/ath79/setup.c 
    454454+++ b/arch/mips/ath79/setup.c 
    455 @@ -175,14 +175,29 @@ static void __init ath79_detect_sys_type 
     455@@ -176,6 +176,18 @@ static void __init ath79_detect_sys_type 
    456456                rev = id & QCA955X_REV_ID_REVISION_MASK; 
    457457                break; 
     
    472472                panic("ath79: unknown SoC, id:0x%08x", id); 
    473473        } 
    474   
    475         ath79_soc_rev = rev; 
     474@@ -183,9 +195,12 @@ static void __init ath79_detect_sys_type 
     475        if (ver == 1) 
     476                ath79_soc_rev = rev; 
    476477  
    477478-       if (soc_is_qca953x() || soc_is_qca955x()) 
    478 -               sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u", 
    479479+       if (soc_is_qca953x() || soc_is_qca955x() || soc_is_qca9561()) 
    480 +               sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u", 
    481 +                       chip, ver, rev); 
     480                sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u", 
     481                        chip, ver, rev); 
    482482+       else if (soc_is_tp9343()) 
    483483+               sprintf(ath79_sys_type, "Qualcomm Atheros TP%s rev %u", 
    484                         chip, rev); 
     484+                       chip, rev); 
    485485        else 
    486486                sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev); 
     487        pr_info("SoC: %s\n", ath79_sys_type); 
    487488--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h 
    488489+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h 
Note: See TracChangeset for help on using the changeset viewer.