2
0

019-rt2800-comment-and-simplify-AGC-init-for-RT6352.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. From c7ff1bfeaf1ca69e3e401be211b55d1738d0c5fc Mon Sep 17 00:00:00 2001
  2. From: Stanislaw Gruszka <[email protected]>
  3. Date: Wed, 13 Feb 2019 11:09:16 +0100
  4. Subject: [PATCH 19/28] rt2800: comment and simplify AGC init for RT6352
  5. We do not need separate lines for calculating register values.
  6. Also add comment that value is different than in vendor driver.
  7. Suggested-by: Daniel Golle <[email protected]>
  8. Signed-off-by: Stanislaw Gruszka <[email protected]>
  9. Signed-off-by: Kalle Valo <[email protected]>
  10. ---
  11. drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 9 ++++++---
  12. 1 file changed, 6 insertions(+), 3 deletions(-)
  13. --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
  14. +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
  15. @@ -3989,9 +3989,12 @@ static void rt2800_config_channel(struct
  16. rt2800_bbp_write(rt2x00dev, 195, 141);
  17. rt2800_bbp_write(rt2x00dev, 196, reg);
  18. - /* AGC init */
  19. - reg = rf->channel <= 14 ? 0x1c : 0x24;
  20. - reg += 2 * rt2x00dev->lna_gain;
  21. + /* AGC init.
  22. + * Despite the vendor driver using different values here for
  23. + * RT6352 chip, we use 0x1c for now. This may have to be changed
  24. + * once TSSI got implemented.
  25. + */
  26. + reg = (rf->channel <= 14 ? 0x1c : 0x24) + 2*rt2x00dev->lna_gain;
  27. rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg);
  28. rt2800_iq_calibrate(rt2x00dev, rf->channel);