mac80211: update to backports-4.14-rc2
[openwrt/staging/lynxis.git] / package / kernel / mac80211 / patches / 650-rt2x00-add-support-for-external-PA-on-MT7620.patch
index 64a62f4b0792168fb60e3f33b20d0f8a751aa911..9fad80b67264579dac262021b534cb696c9e1474 100644 (file)
@@ -25,7 +25,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
   * EEPROM LNA
 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -4114,6 +4114,61 @@ static void rt2800_config_channel(struct
+@@ -4120,6 +4120,61 @@ static void rt2800_config_channel(struct
                rt2800_iq_calibrate(rt2x00dev, rf->channel);
        }
  
@@ -34,11 +34,11 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +                           &rt2x00dev->cap_flags)) {
 +                      rt2x00_warn(rt2x00dev, "Using incomplete support for " \
 +                                             "external PA\n");
-+                      rt2800_register_read(rt2x00dev, RF_CONTROL3, &reg);
++                      reg = rt2800_register_read(rt2x00dev, RF_CONTROL3);
 +                      reg |= 0x00000101;
 +                      rt2800_register_write(rt2x00dev, RF_CONTROL3, reg);
 +
-+                      rt2800_register_read(rt2x00dev, RF_BYPASS3, &reg);
++                      reg = rt2800_register_read(rt2x00dev, RF_BYPASS3);
 +                      reg |= 0x00000101;
 +                      rt2800_register_write(rt2x00dev, RF_BYPASS3, reg);
 +
@@ -84,12 +84,12 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +              }
 +      }
 +
-       rt2800_bbp_read(rt2x00dev, 4, &bbp);
+       bbp = rt2800_bbp_read(rt2x00dev, 4);
        rt2x00_set_field8(&bbp, BBP4_BANDWIDTH, 2 * conf_is_ht40(conf));
        rt2800_bbp_write(rt2x00dev, 4, bbp);
-@@ -9308,7 +9363,8 @@ static int rt2800_init_eeprom(struct rt2
+@@ -9314,7 +9369,8 @@ static int rt2800_init_eeprom(struct rt2
         */
-       rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1, &eeprom);
+       eeprom = rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1);
  
 -      if (rt2x00_rt(rt2x00dev, RT3352)) {
 +      if (rt2x00_rt(rt2x00dev, RT3352) ||
@@ -97,11 +97,11 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
                if (rt2x00_get_field16(eeprom,
                    EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352))
                    __set_bit(CAPABILITY_EXTERNAL_PA_TX0,
-@@ -9319,6 +9375,18 @@ static int rt2800_init_eeprom(struct rt2
+@@ -9325,6 +9381,18 @@ static int rt2800_init_eeprom(struct rt2
                              &rt2x00dev->cap_flags);
        }
  
-+      rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF2, &eeprom);
++      eeprom = rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF2);
 +
 +      if (rt2x00_rt(rt2x00dev, RT6352) && eeprom != 0 && eeprom != 0xffff) {
 +              if (rt2x00_get_field16(eeprom,