mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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 <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
cd76a835bb
commit
9b97e0f2a5
+1
-1
@@ -1004,13 +1004,13 @@ int mt76x0_phy_set_channel(struct mt76x02_dev *dev,
|
||||
|
||||
mt76x0_read_rx_gain(dev);
|
||||
mt76x0_phy_set_chan_bbp_params(dev, rf_bw_band);
|
||||
mt76x02_init_agc_gain(dev);
|
||||
|
||||
/* enable vco */
|
||||
mt76x0_rf_set(dev, MT_RF(0, 4), BIT(7));
|
||||
if (scan)
|
||||
return 0;
|
||||
|
||||
mt76x02_init_agc_gain(dev);
|
||||
mt76x0_phy_calibrate(dev, false);
|
||||
mt76x0_phy_set_txpower(dev);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user