302-ath9k_hw-add-low-power-tx-gain-table-for-AR953x.patch 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. From: Felix Fietkau <nbd@openwrt.org>
  2. Date: Thu, 14 Jan 2016 03:14:03 +0100
  3. Subject: [PATCH] ath9k_hw: add low power tx gain table for AR953x
  4. Used in some newer TP-Link AR9533 devices.
  5. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  6. ---
  7. --- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
  8. +++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
  9. @@ -698,6 +698,9 @@ static void ar9003_tx_gain_table_mode2(s
  10. else if (AR_SREV_9340(ah))
  11. INIT_INI_ARRAY(&ah->iniModesTxGain,
  12. ar9340Modes_low_ob_db_tx_gain_table_1p0);
  13. + else if (AR_SREV_9531_11(ah))
  14. + INIT_INI_ARRAY(&ah->iniModesTxGain,
  15. + qca953x_1p1_modes_no_xpa_low_power_tx_gain_table);
  16. else if (AR_SREV_9485_11_OR_LATER(ah))
  17. INIT_INI_ARRAY(&ah->iniModesTxGain,
  18. ar9485Modes_low_ob_db_tx_gain_1_1);
  19. --- a/drivers/net/wireless/ath/ath9k/ar953x_initvals.h
  20. +++ b/drivers/net/wireless/ath/ath9k/ar953x_initvals.h
  21. @@ -757,6 +757,71 @@ static const u32 qca953x_1p1_modes_xpa_t
  22. {0x00016448, 0x6c927a70},
  23. };
  24. +static const u32 qca953x_1p1_modes_no_xpa_low_power_tx_gain_table[][2] = {
  25. + /* Addr allmodes */
  26. + {0x0000a2dc, 0xfff55592},
  27. + {0x0000a2e0, 0xfff99924},
  28. + {0x0000a2e4, 0xfffe1e00},
  29. + {0x0000a2e8, 0xffffe000},
  30. + {0x0000a410, 0x000050d6},
  31. + {0x0000a500, 0x00000069},
  32. + {0x0000a504, 0x0400006b},
  33. + {0x0000a508, 0x0800006d},
  34. + {0x0000a50c, 0x0c000269},
  35. + {0x0000a510, 0x1000026b},
  36. + {0x0000a514, 0x1400026d},
  37. + {0x0000a518, 0x18000669},
  38. + {0x0000a51c, 0x1c00066b},
  39. + {0x0000a520, 0x1d000a68},
  40. + {0x0000a524, 0x21000a6a},
  41. + {0x0000a528, 0x25000a6c},
  42. + {0x0000a52c, 0x29000a6e},
  43. + {0x0000a530, 0x2d0012a9},
  44. + {0x0000a534, 0x310012ab},
  45. + {0x0000a538, 0x350012ad},
  46. + {0x0000a53c, 0x39001b0a},
  47. + {0x0000a540, 0x3d001b0c},
  48. + {0x0000a544, 0x41001b0e},
  49. + {0x0000a548, 0x43001bae},
  50. + {0x0000a54c, 0x45001914},
  51. + {0x0000a550, 0x47001916},
  52. + {0x0000a554, 0x49001b96},
  53. + {0x0000a558, 0x49001b96},
  54. + {0x0000a55c, 0x49001b96},
  55. + {0x0000a560, 0x49001b96},
  56. + {0x0000a564, 0x49001b96},
  57. + {0x0000a568, 0x49001b96},
  58. + {0x0000a56c, 0x49001b96},
  59. + {0x0000a570, 0x49001b96},
  60. + {0x0000a574, 0x49001b96},
  61. + {0x0000a578, 0x49001b96},
  62. + {0x0000a57c, 0x49001b96},
  63. + {0x0000a600, 0x00000000},
  64. + {0x0000a604, 0x00000000},
  65. + {0x0000a608, 0x00000000},
  66. + {0x0000a60c, 0x00000000},
  67. + {0x0000a610, 0x00000000},
  68. + {0x0000a614, 0x00000000},
  69. + {0x0000a618, 0x00804201},
  70. + {0x0000a61c, 0x01408201},
  71. + {0x0000a620, 0x01408502},
  72. + {0x0000a624, 0x01408502},
  73. + {0x0000a628, 0x01408502},
  74. + {0x0000a62c, 0x01408502},
  75. + {0x0000a630, 0x01408502},
  76. + {0x0000a634, 0x01408502},
  77. + {0x0000a638, 0x01408502},
  78. + {0x0000a63c, 0x01408502},
  79. + {0x0000b2dc, 0xfff55592},
  80. + {0x0000b2e0, 0xfff99924},
  81. + {0x0000b2e4, 0xfffe1e00},
  82. + {0x0000b2e8, 0xffffe000},
  83. + {0x00016044, 0x044922db},
  84. + {0x00016048, 0x6c927a70},
  85. + {0x00016444, 0x044922db},
  86. + {0x00016448, 0x6c927a70},
  87. +};
  88. +
  89. static const u32 qca953x_2p0_baseband_core[][2] = {
  90. /* Addr allmodes */
  91. {0x00009800, 0xafe68e30},