1
0

600-19-rt2x00-rt2800lib-fix-LNA-gain-configuration-for-RT38.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. From 6d668fef3a1baa60bdd715ee062ddb6333d2647c Mon Sep 17 00:00:00 2001
  2. From: Gabor Juhos <juhosg@openwrt.org>
  3. Date: Mon, 30 Sep 2013 16:58:23 +0200
  4. Subject: [PATCH] rt2x00: rt2800lib: fix LNA gain configuration for RT3883
  5. Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  6. ---
  7. drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 6 ++++--
  8. 1 file changed, 4 insertions(+), 2 deletions(-)
  9. --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
  10. +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
  11. @@ -2036,7 +2036,8 @@ static void rt2800_config_lna_gain(struc
  12. rt2800_eeprom_read(rt2x00dev, EEPROM_LNA, &eeprom);
  13. lna_gain = rt2x00_get_field16(eeprom, EEPROM_LNA_A0);
  14. } else if (libconf->rf.channel <= 128) {
  15. - if (rt2x00_rt(rt2x00dev, RT3593)) {
  16. + if (rt2x00_rt(rt2x00dev, RT3593) ||
  17. + rt2x00_rt(rt2x00dev, RT3883)) {
  18. rt2800_eeprom_read(rt2x00dev, EEPROM_EXT_LNA2, &eeprom);
  19. lna_gain = rt2x00_get_field16(eeprom,
  20. EEPROM_EXT_LNA2_A1);
  21. @@ -2046,7 +2047,8 @@ static void rt2800_config_lna_gain(struc
  22. EEPROM_RSSI_BG2_LNA_A1);
  23. }
  24. } else {
  25. - if (rt2x00_rt(rt2x00dev, RT3593)) {
  26. + if (rt2x00_rt(rt2x00dev, RT3593) ||
  27. + rt2x00_rt(rt2x00dev, RT3883)) {
  28. rt2800_eeprom_read(rt2x00dev, EEPROM_EXT_LNA2, &eeprom);
  29. lna_gain = rt2x00_get_field16(eeprom,
  30. EEPROM_EXT_LNA2_A2);