rt2800: do VCO calibration after programming ALC
authorDaniel Golle <daniel@makrotopia.org>
Mon, 17 Apr 2017 19:32:12 +0000 (21:32 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 20 Apr 2017 11:00:00 +0000 (14:00 +0300)
Somehow AP doesn't come up and the first scan fails if we don't do
VCO calibration every time.
The vendor driver duplicates the VCO calibration function into the
channel switching logic, we can do the same with less duplication.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ralink/rt2x00/rt2800lib.c

index 7135519a638c9493c546784669fd582671058272..870bf315f98be7cbadf3993106b3151a7c253ea6 100644 (file)
@@ -3407,6 +3407,8 @@ static void rt2800_config_alc(struct rt2x00_dev *rt2x00dev,
                        rt2800_rfcsr_write(rt2x00dev, 42, 0x5b);
        }
        rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, mac_sys_ctrl);
+
+       rt2800_vco_calibration(rt2x00dev);
 }
 
 static void rt2800_bbp_write_with_rx_chain(struct rt2x00_dev *rt2x00dev,