diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2018-11-01 16:35:01 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-11-30 12:21:43 +0100 |
commit | f1b8ee35fec4a070b7760a99709fc98f237c2b86 (patch) | |
tree | 33232312bcd1036f22b84688af0aa55cf13f7f75 /drivers/net/wireless/mediatek/mt76/mt76x02_phy.c | |
parent | mt76: remove wait argument from mt76x02_mcu_set_radio_state (diff) | |
download | linux-f1b8ee35fec4a070b7760a99709fc98f237c2b86.tar.xz linux-f1b8ee35fec4a070b7760a99709fc98f237c2b86.zip |
mt76x02: run calibration after scanning
If we are associated and scanning is performed, sw_scan_complete callback
is done after we get back to operating channel, so we do not perform
queue cal work. Fix this queue cal work from sw_scan_complete().
On mt76x0 we have to restore gain in MT_BBP(AGC, 8) register after
scanning, as it was multiple times modified by channel switch code.
So queue cal work without any delay to set AGC gain value.
Similar like in mt76x2 init AGC gain only when set operating channel
and just check before queuing cal work in sw_scan_complete() if
initialization was already done.
Fixes: bbd10586f0df ("mt76x0: phy: do not run calibration during channel switch")
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_phy.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02_phy.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_phy.c b/drivers/net/wireless/mediatek/mt76/mt76x02_phy.c index 0f1d7b5c9f68..977a8e7e26df 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_phy.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_phy.c @@ -254,5 +254,6 @@ void mt76x02_init_agc_gain(struct mt76x02_dev *dev) memcpy(dev->cal.agc_gain_cur, dev->cal.agc_gain_init, sizeof(dev->cal.agc_gain_cur)); dev->cal.low_gain = -1; + dev->cal.gain_init_done = true; } EXPORT_SYMBOL_GPL(mt76x02_init_agc_gain); |