]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
rt2x00: Simplify check for external LNA in rt2800_init_rfcsr.
authorGertjan van Wingerde <gwingerde@gmail.com>
Thu, 3 Jun 2010 08:52:02 +0000 (10:52 +0200)
committerIvo van Doorn <IvDoorn@gmail.com>
Thu, 3 Jun 2010 08:52:02 +0000 (10:52 +0200)
Instead of parsing the EEPROM information, use the flag that was set during
device initialization.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
drivers/net/wireless/rt2x00/rt2800lib.c

index 4a01f2a5ce6ba56c882e796ba41eb223e22c1b38..cf2e3b9f77f88b2c622b4547db2373282b688e62 100644 (file)
@@ -2072,8 +2072,7 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
        if (rt2x00_rt_rev_lt(rt2x00dev, RT3071, REV_RT3071E) ||
            rt2x00_rt_rev_lt(rt2x00dev, RT3090, REV_RT3090E) ||
            rt2x00_rt_rev_lt(rt2x00dev, RT3390, REV_RT3390E)) {
-               rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &eeprom);
-               if (rt2x00_get_field16(eeprom, EEPROM_NIC_EXTERNAL_LNA_BG))
+               if (test_bit(CONFIG_EXTERNAL_LNA_BG, &rt2x00dev->flags))
                        rt2x00_set_field8(&rfcsr, RFCSR17_R, 1);
        }
        rt2x00_eeprom_read(rt2x00dev, EEPROM_TXMIXER_GAIN_BG, &eeprom);