* 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);
}
+ &rt2x00dev->cap_flags)) {
+ rt2x00_warn(rt2x00dev, "Using incomplete support for " \
+ "external PA\n");
-+ rt2800_register_read(rt2x00dev, RF_CONTROL3, ®);
++ reg = rt2800_register_read(rt2x00dev, RF_CONTROL3);
+ reg |= 0x00000101;
+ rt2800_register_write(rt2x00dev, RF_CONTROL3, reg);
+
-+ rt2800_register_read(rt2x00dev, RF_BYPASS3, ®);
++ reg = rt2800_register_read(rt2x00dev, RF_BYPASS3);
+ reg |= 0x00000101;
+ rt2800_register_write(rt2x00dev, RF_BYPASS3, reg);
+
+ }
+ }
+
- 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) ||
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,