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 <mail@david-bauer.net>
Link: https://patch.msgid.link/20260516144944.2574053-1-mail@david-bauer.net
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
David Bauer 2026-05-16 16:49:42 +02:00 committed by Felix Fietkau
parent e65b4ca339
commit a92cd5dd79

View File

@ -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;