mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7915: configure noise floor reporting on reset
When performing a full system recovery of the MCU on a dual-phy platform, band 0 (usually 2.4GHz) stops reading correct noise floor data. This is due to noise floor reporting only being configured correctly for the second device PHY. Configure the respective registers correctly after restarting the MCU firmware to fix reported noise-floor values. Signed-off-by: David Bauer <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
2e240e194d
commit
b1f962a838
+7
-2
@@ -1292,6 +1292,7 @@ mt7915_mac_restart(struct mt7915_dev *dev)
|
||||
struct mt7915_phy *phy2;
|
||||
struct mt76_phy *ext_phy;
|
||||
struct mt76_dev *mdev = &dev->mt76;
|
||||
bool run_main, run_ext;
|
||||
int i, ret;
|
||||
|
||||
ext_phy = dev->mt76.phys[MT_BAND1];
|
||||
@@ -1387,13 +1388,17 @@ mt7915_mac_restart(struct mt7915_dev *dev)
|
||||
mt7915_init_txpower(phy2);
|
||||
ret = mt7915_txbf_init(dev);
|
||||
|
||||
if (test_bit(MT76_STATE_RUNNING, &dev->mphy.state)) {
|
||||
run_main = test_and_clear_bit(MT76_STATE_RUNNING, &dev->mphy.state);
|
||||
run_ext = ext_phy &&
|
||||
test_and_clear_bit(MT76_STATE_RUNNING, &ext_phy->state);
|
||||
|
||||
if (run_main) {
|
||||
ret = mt7915_run(dev->mphy.hw);
|
||||
if (ret)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (ext_phy && test_bit(MT76_STATE_RUNNING, &ext_phy->state)) {
|
||||
if (run_ext) {
|
||||
ret = mt7915_run(ext_phy->hw);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user