016-rt2x00-remove-confusing-AGC-register.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. From 5991a2ecd070ce5ef646b4e8e0bc8d99110604ed Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Tomislav=20Po=C5=BEega?= <[email protected]>
  3. Date: Wed, 13 Feb 2019 11:09:13 +0100
  4. Subject: [PATCH 16/28] rt2x00: remove confusing AGC register
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Register 66 was causing issues on RT6352 if set to the same value as
  9. in MTK driver. With 1c reg value device was working fine in both HT20
  10. and HT40 modes.
  11. Signed-off-by: Tomislav Požega <[email protected]>
  12. Signed-off-by: Stanislaw Gruszka <[email protected]>
  13. Signed-off-by: Kalle Valo <[email protected]>
  14. ---
  15. drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 6 +-----
  16. 1 file changed, 1 insertion(+), 5 deletions(-)
  17. --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
  18. +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
  19. @@ -3983,11 +3983,7 @@ static void rt2800_config_channel(struct
  20. rt2800_bbp_write(rt2x00dev, 196, reg);
  21. /* AGC init */
  22. - if (rt2x00_rt(rt2x00dev, RT6352))
  23. - reg = 0x04;
  24. - else
  25. - reg = rf->channel <= 14 ? 0x1c : 0x24;
  26. -
  27. + reg = rf->channel <= 14 ? 0x1c : 0x24;
  28. reg += 2 * rt2x00dev->lna_gain;
  29. rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg);