rt2x00: merge agc and vco works with link tuner

We need to perform different actions (AGC and VCO calibrations and VGC
tuning) periodically at different intervals. We don't need separate
works for those, we can use link tuner work and just check for proper
interval on it.

This fixes performing AGC and VCO calibration when scanning on STA
mode. We need to be on-channel to perform those calibrations.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
这个提交包含在:
Stanislaw Gruszka
2016-12-19 11:52:54 +01:00
提交者 Kalle Valo
父节点 24d42ef3b1
当前提交 d96324703f
修改 3 个文件,包含 36 行新增128 行删除

查看文件

@@ -29,9 +29,10 @@
* Interval defines
*/
#define WATCHDOG_INTERVAL round_jiffies_relative(HZ)
#define LINK_TUNE_INTERVAL round_jiffies_relative(HZ)
#define AGC_INTERVAL round_jiffies_relative(4 * HZ)
#define VCO_INTERVAL round_jiffies_relative(10 * HZ) /* 10 sec */
#define LINK_TUNE_SECONDS 1
#define LINK_TUNE_INTERVAL round_jiffies_relative(LINK_TUNE_SECONDS * HZ)
#define AGC_SECONDS 4
#define VCO_SECONDS 10
/*
* rt2x00_rate: Per rate device information
@@ -270,30 +271,6 @@ void rt2x00link_start_watchdog(struct rt2x00_dev *rt2x00dev);
*/
void rt2x00link_stop_watchdog(struct rt2x00_dev *rt2x00dev);
/**
* rt2x00link_start_agc - Start periodic gain calibration
* @rt2x00dev: Pointer to &struct rt2x00_dev.
*/
void rt2x00link_start_agc(struct rt2x00_dev *rt2x00dev);
/**
* rt2x00link_start_vcocal - Start periodic VCO calibration
* @rt2x00dev: Pointer to &struct rt2x00_dev.
*/
void rt2x00link_start_vcocal(struct rt2x00_dev *rt2x00dev);
/**
* rt2x00link_stop_agc - Stop periodic gain calibration
* @rt2x00dev: Pointer to &struct rt2x00_dev.
*/
void rt2x00link_stop_agc(struct rt2x00_dev *rt2x00dev);
/**
* rt2x00link_stop_vcocal - Stop periodic VCO calibration
* @rt2x00dev: Pointer to &struct rt2x00_dev.
*/
void rt2x00link_stop_vcocal(struct rt2x00_dev *rt2x00dev);
/**
* rt2x00link_register - Initialize link tuning & watchdog functionality
* @rt2x00dev: Pointer to &struct rt2x00_dev.